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. 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.
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. 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.
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
Python setuptools installer alternative
- yliu on October 31, 2010, 09:29 PM UTC
I've also found success using ez_setup.py. Running it with the Python interpreter at the command-line appears to install easy_install / setuptools. I have not tested this extensively, but it does pass the "works-for-me" test on my new Win7 dev box.
References used:
ez_setup.py
( http://peak.telecommunity.com/dist/ez_setup.py ) - found by yliu on October 31, 2010, 09:27 PM UTC
Comments
I am a newbe trying to set up Python33 with Selenium Webdriver. But seem to need pip and setuptools and haven't worked out how to install any of them.
—
Please can you help?
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 UTCThanks a billion, I was clueless why it wasn't working before. Your solution is easy and works perfectly.
— Tasha on August 23, 2011, 04:37 PM UTCThanks a heap! Works great.
— ok on October 16, 2011, 12:39 PM UTCThank you Stuart!
— yamex5 on October 31, 2011, 05:15 AM UTCI had tried many other solutions, none of which worked until I found yours.
Very much appreciate your input!
-Mike
Thanks!!!!!
— Marouane on November 04, 2011, 03:06 PM UTCAwesone!! Also thanks to the first post about replicating a cluster.
— okand nice on December 10, 2011, 05:00 PM UTCthanks Stuart!
— rez on February 13, 2012, 06:13 AM UTCmuch appreciated
— keb on March 09, 2012, 07:39 PM UTCsolved my problem for installing ipython.
Thanks a lot
— H on March 09, 2012, 08:14 PM UTCthks man!
— yech on April 17, 2012, 04:18 PM UTCthanks so much! to repeat everyone else, you are the best stu
— tignas on June 15, 2012, 03:46 PM UTCThis worked when I had problems installing PIL. Thanks a lot!
— Sverigevader on June 19, 2012, 12:14 AM UTCOOOOoooohhh!! Stuart Lathrop Merciiiiiiiiii Merciiiiiiiiiiiiiiiiiii :D
— Engel on July 31, 2012, 05:45 AM UTCThanks for this step by step help. it worked.. :)
— Shahid on August 22, 2012, 02:55 PM UTCmuchas gracias! funciona perfectamente ahora
— Ricardo on October 18, 2012, 08:08 PM UTCno podia instalar la PIL (Python Image Library) la cual es necesaria para usar el modulo Image... un verdadero dolor de cabeza para windows en 64 bits
Stuart is a true hero! :)
— Wouter on October 29, 2012, 09:53 PM UTCThanks so much!
— Ryan on November 03, 2012, 06:58 PM UTCthat HELPED, thanx alot :)
— Sane on January 17, 2013, 01:59 PM UTCThanks a lot!
— Gert on January 30, 2013, 08:00 PM UTCthank you very much!
— Sam V on February 10, 2013, 03:53 AM UTCGreat!!! I would never get there alone :P
— nuno on January 10, 2014, 04:51 PM UTCThanks a lot. Your suggestion saved my weekend from getting spoiled :)
— Sumit on January 31, 2014, 11:22 PM UTCPerfect solution. Thanks a lot!
— jo on February 12, 2016, 08:07 PM UTC