I'm running Python 2.7 on Windows 7 64-bit, and when I run the installer for setuptools it tells me that Python 2.7 is not installed. The specific error message is:
`Python Version 2.7 required which was not found in the registry`
My installed version of Python is:
`Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32`
I'm looking at the setuptools site and it doesn't mention any installers for 64-bit Windows. Have I missed something or do I have to install this from source?
The recommended way to install setuptools on Windows is to download ez_setup.py and run it. The script will download the appropriate . egg file and install it for you. Once installation is complete, you will find an easy_install program in your Python Scripts subdirectory.
Follow the below steps to install the Setuptools on Windows using the setup.py file: Step 1: Download the latest source package of Setuptools for Python3 from here. Step 2: Extract the downloaded package using the given command. Step 3: Go to the setuptools-60.2.
To use a specific version of setuptools it is necessary to have it in both locations - in pyproject. toml and at the beginning of install_requires of setup.py. The tool like pip will use the version from pyproject. toml to build the project.
Problem: you have 64-bit Python, and a 32-bit installer. This will cause problems for extension modules.
The reasons why the installer doesn't finds Python is the transparent 32-bit emulation from Windows 7. 64-bit and 32-bit programs will write to different parts of the Windows registry.
64-bit: HKLM|HKCU\SOFTWARE\
32-bit: HKLM|HKCU\SOFTWARE\wow6432node\
.
This means that the 64-bit Python installer writes to HKLM\SOFTWARE\Python
, but the 32-bit setuptools installer looks at HKLM\SOFTWARE\wow6432node\Python
(this is handled by windows automatically, programs don't notice). This is expected behavior and not a bug.
Usually, you have these choices:
HKLM\SOFTWARE\Python
to HKLM\SOFTWARE\wow6432node\Python
, but this will cause problems with binary distributions, as 64-bit Python can't load 32-bit compiled modules (do NOT do this!)For setuptools itself, for example, you can't use a 32-bit installer for 64-bit Python as it includes binary files. But there's a 64-bit installer at http://www.lfd.uci.edu/~gohlke/pythonlibs/ (has many installers for other modules too). Nowadays, many packages on PyPi have binary distributions, so you can install them via pip.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With