I am attempting to install setuptools for Windows 7 64-bit. Upon downloading the installer msi file for setuptools 0.6c11 for Python 2.6, the installer fails at the second stage with an error message "Python version 2.6 is required, which was not found in the registry".
I examined the Windows registry with regedit, and found an InstallPath variable at HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\InstallPath. Clearly there is a registry value for the Python installation.
Workaround to install setuptools 0.6rc11 for Windows 64-bit
-
yliu on February 11, 2010, 05:02 AM UTC
Apparently, the setuptools msi is looking for the Python installation registry value InstallPath in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\InstallPath. Notice the Wow6432Node, which is a registry compatibility layer used for 32-bit apps in Windows 7 64-bit.
As far as I can tell, InstallPath is the only value that this installer looks for. Therefore, using regedit, you can create your own registry value HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\InstallPath, and copy over the InstallPath value from HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\InstallPath. To be paranoid, you can try replicating the entire cluster, not just InstallPath.
After this, installation for setuptools seems to proceed correctly.
Hopefully they'll fix this bug at some point, though the "not my problem" bug punting so far at the Python tracker and the Setuptools tracker makes this look somewhat unlikely.
As far as I can tell, InstallPath is the only value that this installer looks for. Therefore, using regedit, you can create your own registry value HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\InstallPath, and copy over the InstallPath value from HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\InstallPath. To be paranoid, you can try replicating the entire cluster, not just InstallPath.
After this, installation for setuptools seems to proceed correctly.
Hopefully they'll fix this bug at some point, though the "not my problem" bug punting so far at the Python tracker and the Setuptools tracker makes this look somewhat unlikely.
References used:
Issue 2: easy_install broken on 64 bits Windows - Setuptools tracker
( http://bugs.python.org/setuptools/issue2 ) - found by
yliu on February 11, 2010, 04:56 AM UTC

Comments
This is the right solution; to make life easier I follow this expanded version of the "replicating the entire cluster" solution:
Step 1: Launch regedit.exe and locate the key "HKEY_LOCAL_MACHINE\SOFTWARE\Python".
Step 2: With this branch selected, go to the File menu and select Export. Confirm that the "Export range" radio button is set to "Selected branch". Navigate to the directory in which to store your export, provide a File name (I used 'Python') and click "Save".
Step 3: Open the export file in your favorite editor, and insert the "Wow6432Node" folder between "SOFTWARE" and "Python" so each line begins "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python". Save the changes.
Step 4: Double-click on the modified export file and Merge this registry data.
Problem Solved!
— Stuart Lathrop on March 06, 2010, 11:30 PM UTCThank you so much! That was so easy.
— Anon on August 12, 2010, 05:21 AM UTC