Git Product home page Git Product logo

pythonwin7's Introduction

Unofficial Python Installers for Windows 7 SP1 and Windows Server 2008 R2

Officially, Python 3.9 and above are not supported on Windows 7 SP1 and Windows Server 2008 R2. Here, you can obtain unofficial Windows installers that bring back support for these older Windows versions.

Note: Windows update KB2533623 must be installed for Python to run. Ensure that your computer is up-to-date via Windows Update. Alternatively, you can manually install update KB3063858, which supersedes KB2533623. Update KB3063858 can be obtained at the following link for 32-bit Windows or 64-bit Windows.

For each Python version, this repository includes the following.

  • 64-bit executable installer (e.g. python-3.9.0-amd64-full.exe)
  • 32-bit executable installer (e.g. python-3.9.0-full.exe)
  • 64-bit embeddable zip file (e.g. python-3.9.0-embed-amd64.zip)
  • 32-bit embeddable zip file (e.g. python-3.9.0-embed-win32.zip)
  • 64-bit NuGet package (e.g. python.3.9.0.nupkg)
  • 32-bit NuGet package (e.g. pythonx86.3.9.0.nupkg)
  • Windows help file (e.g. python390.chm) (3.9 and 3.10 only)

For the more technical among you, these installers were built from the source distributions published at https://www.python.org/downloads/source/, with the following modifications.

  • Include the file api-ms-win-core-path-l1-1-0.dll in the distribution. This file was obtained from https://github.com/nalexandru/api-ms-win-core-path-HACK and is necessary for Python to run on older Windows versions.
  • Create full installers that include debugging symbols and debug binaries without needing to download them.
  • Allow the installer to proceed on Windows 7 SP1 and Windows Server 2008 R2.
  • For Python 3.11 or higher, remove the usage of features that are not available on Windows 7.
  • Fix a few bugs in the build scripts.

See Notes.md for more specific details about how I built these installers and how you may build them yourself.

NuGet Packages

To install a .nupkg package, ensure that you have the NuGet Command-Line Interface installed. Go to the directory containing the .nupkg file. Replace target\installation\directory in the following commands with the desired location to install the package.

Command Prompt

For 64-bit Python, run nuget install python -Source %cd% -OutputDirectory target\installation\directory

For 32-bit Python, run nuget install pythonx86 -Source %cd% -OutputDirectory target\installation\directory

PowerShell

For 64-bit Python, run nuget install python -Source $(Get-Location) -OutputDirectory target\installation\directory

For 32-bit Python, run nuget install pythonx86 -Source $(Get-Location) -OutputDirectory target\installation\directory

Git History

In an effort to keep the size of this repository low, the Git history will not be kept. All updates will be made via force-pushes. If you fork this repository and wish to update your fork, see https://stackoverflow.com/questions/9646167/clean-up-a-fork-and-restart-it-from-the-upstream.

License

These files are provided under the MIT License. See LICENSE.txt.

Who am I

I am Aohan Dang (https://www.linkedin.com/in/aohan-dang-536643a7/), a professional software developer and Python enthusiast.

pythonwin7's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pythonwin7's Issues

How to install via `nuget`?

Dear devs,

That's an awesome work you do here!

There are nuget packages available in the repo. However, I can't do just

nuget install "https://github.com/adang1345/PythonWin7/blob/master/3.11.3/python.3.11.3.nupkg"

Neither can I add the repo to nuget sources:

nuget sources add -name "PythonWin7" -source "https://github.com/adang1345/PythonWin7/blob/master/"

Well, I can, but without a JSON description of the repo, it doesn't make much sense.

Please add a word or two to the README about how to use the packages and how to make Python auto-updatable.

python 3.12: os.fstat() raises WinError 87

Here is an example reproducer:

>>> import os
>>> os.stat('c:\\windows\\notepad.exe')
os.stat_result(st_mode=33279, st_ino=281474976770376, st_dev=3158229071, st_nlink=2, st_uid=0, st_gid=0, st_size=193024, st_atime=1464830981, st_mtime=1464830981, st_ctime=1464830981)
>>> f = open('c:\\windows\\notepad.exe', 'rb')
>>> f.fileno()
3
>>> os.fstat(f.fileno())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [WinError 87] The parameter is incorrect

I did not observe this issue with python 3.11.

Request: adding license and who you are :)

Firstly, I would like to thank you for making and actively maintaining PythonWin7 (similar sentiment to #2). Companies in the manufacturing industry tend to use older OS's... many suppliers still distribute Windows 7 by default.

This request is two parts:

  • Would you mind adding a brief section to the README saying who you are? Just for encouraging potential users that you are legit
  • Would you mind adding a license to the project?

Notable changes in Python 3.14

Notes to self for when I start working on Python 3.14 on Windows 7.

Test the pathlib.Path.copy() method introduced in python/cpython#119058 and modified in python/cpython@f09d184. It uses CopyFile2(), which is not available on Windows 7, but it appears to have a fallback when it's not available. I think this method will work fine on Windows 7, but I should test it.

Pandas compatibility

I m trying to use pandas with 3.9 or 3.11 on usb stick and E:\python3.11

import pandas
Traceback (most recent call last):
File "", line 1, in
File "E:\python3.11\pandas_init_.py", line 16, in
raise ImportError(
ImportError: Unable to import required dependencies:
numpy:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html       

Please note and check the following:

  • The Python version is: Python3.11 from "E:\python3.11\python.exe"
  • The NumPy version is: "1.21.6"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath'

Python 3.13

Are there any plans to create ver 3.13 builds/Win7?
thanks!

Requires win7

I'm already have win7 but it is requires win7, what?
image

Notable changes in Python 3.13

Notes to self for when I start working on Python 3.13 on Windows 7.

ProcessSnapshot.h is not available on Windows 7, so restore-win7-handling.patch reverts the change that introduced its usage to the win32_getppid() function in posixmodule.c. python/cpython@be1c808 introduces an alternate implementation that does not require ProcessSnapshot.h. It uses deprecated Windows functions and falls back to using ProcessSnapshot.h if those functions fail or no longer exist. Modify the patch to use this alternate implementation for Windows 7 and remove the fallback given that Windows 7 is not going to remove the deprecated functions.

python/cpython@1d95451 adds GetSystemTimePreciseAsFileTime(), which is not available on Windows 7.

Python 3.11.6, 3.12.0

Python 3.11.6 and 3.12.0 have been released. I will close this once I have built installers for it.

How do i use the latest version in a workflow?

https://github.com/pcroland/deew/blob/main/.github/workflows/build.yaml
This is the current workflow for a project of mine.

  windows-build:
    name: Windows
    runs-on: windows-latest
    needs: linux-build

    steps:
      - name: Checkout source
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Set up libraries
        run: |
          python -m pip install wheel poetry
          python -m pip install "https://github.com/pcroland/Pyinstaller-Builds/releases/download/PyInstaller/pyinstaller-6.3.0-py3-none-win_amd64.whl"
          python -m pip install .

      - name: Fetch version
        run: |
          $version=$(python -c "print(open('changelog.md', 'r').read().split('\n')[0].split(' ')[2].replace(':', ''))")
          echo "Version: $version"
          echo "RELEASE_VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append

      - name: Build
        run: |
          pyinstaller -F __main__.py -n deew --icon logo/icon.ico

I would like to be able to build a binary with the latest Python that runs on Win7 aswell.
Do i need https://github.com/adang1345/PythonWin7/blob/master/3.12.1/python-3.12.1-embed-amd64.zip or https://github.com/adang1345/PythonWin7/blob/master/3.12.1/python-3.12.1-amd64-full.exe to achieve it?

Windows 7 x86 - "api-ms-win-crt-runtime-l1-1-0.dll" is missing error

Opening "python.exe" from any of "python-3.x.x-embed-win32.zip" results with this error.

I have checked it with different Windows 7 (x86) installations on couple of netbooks which has Intel Atom (old x86 variant) processors. Also I tested different modded Windows 7 32 bit editions on VirtualBox and results were the same.

image

Thanks for making PythonWin7

First of all, thank you~ (',,-ω-,,)♡
for built some unofficial installers for Python 3.9 and 3.10 that work on Windows 7 since it is no longer in the developers' interest to maintain official support.

I hope you can keep the unofficial versions in the future...

Many programs, games, browsers still work without problems in windows 7... It is sad to see when a dev says it is not supported or puts a lock on the executable to not work.

About the *.dll (api-ms-win-core-path-l1-1-0.dll) I have been using it for a time, as well as the DirectX 12 DLL for windows 7:
https://github.com/microsoft/DirectX-Specs/blob/master/d3d/D3D12onWin7.md

d3d12.dll and d3d11on12.dll extracting the nuget package: https://www.nuget.org/packages/Microsoft.Direct3D.D3D12On7

(Oh and I will close the topic after you see it (or you can close it)

Thanks again ♡ (ɔˆз(ˆ⌣ˆc)

Upgrade guidance

RE official -> unofficial:
Is it possible to upgrade directly from official Python x64 (e.g. v3.8) to your unofficial x64 package, or is it recommended/necessary to uninstall the official build first?

RE unofficial -> unofficial:
And once a system is using your unofficial packages, can it be upgraded from version to version in the same (inline) way that the official builds can be?

Thank you

Can't upgrade from Python ≤3.9.6 to ≥3.9.7

Due to python/cpython#96729, the GUIDs of the installer change between Python 3.9.6 and 3.9.7, making it impossible to upgrade across this gap. The installer for Python ≥3.9.7 will fail to recognize that there already exists a Python installation and will instead require a new, side-by-side installation.

PyCharm doesn't support version >= 3.10

On adding interpreter in PyCharm '[unsupported]' in red is prefixed to interpreter entry.
PyCharm detects it as Python 3.1 with message "Python 3.1 has reached its end-of-life date and it is no longer supported in PyCharm"

Which one can support XP?

I am currently researching an old system. Thank you very much for your package. Win7 has been successfully installed to the latest version. May I ask which version of Python XP currently supports? Thank you!

Notification

Dear Aohan Dang,

This is not an issue but a small notification that I have used your patches to build Python 3.9 for Windows Vista and Windows 7. Versions 3.10 and 3.11 will be published later, closer to their final bugfixes. I have published the full source code instead of patches which will make it easy to build in the future when the branches of these versions will be closed in the official CPython repository. I have given you credit.

Regards,
Volodymyr Halchenko

How to Install in an Anaconda Environment?

Currently, I am using Anaconda in Windows 7 Pro for all my Python environments. Each environment is separate and independent for different software.

How do I install this repository in an Anaconda Environment, rather than the entire Windows 7 system?

Is there a way to build a wheel file (.whl) and then pip install that wheel to a conda environment?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.