Saturday, April 6, 2013

Installing Python SetupTools on 64-bit Windows


I already installed Python 2.7 on Windows 7 64-bit. When I try to 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"

This seems to be a known error. As indicated in reference [2].
"Apparently (having faced related 64- and 32-bit issues on OS X) there is a bug in the Windows installer. I stumbled across this workaround, which might help - basically, you 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. See the answer below for more details.


If you do this, beware that setuptools may only install 32-bit libraries."

I followed instructions in reference [1].
"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. Note that this may only install 32-bit libraries -- WoW6432 is a compatibility layer. Check the other documented solution to this problem if this is not sufficient."



Following the instructions seems to solve the issue, and setuptools installation succeeded.

References:
1. http://selfsolved.com/problems/setuptools-06c11-fails-to-instal/s/63
2. http://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows

No comments:

Post a Comment