57

Can't download any python Windows modules and install. I wanted to experiment with scrapy framework and stackless but unable to install due to error "Python version 2.6 required, which was not found in the registry".

Trying to install it to

Windows 7, 64 bit machine

APC
  • 144,005
  • 19
  • 170
  • 281
shaytac
  • 3,789
  • 9
  • 36
  • 44
  • Have you tried installing Python 2.6? – Drew Sears Jun 09 '10 at 18:06
  • i did that already able to run django, use pyhon shell etc... Thanks for the advice! – shaytac Jun 09 '10 at 18:10
  • 1
    possible duplicate of [Python: how do I install SciPy on 64 bit Windows?](http://stackoverflow.com/questions/1517129/python-how-do-i-install-scipy-on-64-bit-windows) – APC Jun 09 '10 at 18:13
  • 2
    Apc is right! I removed the python 64 bit and installed 32 bit version on the system and it worked. Thanks for the pointer – shaytac Jun 09 '10 at 18:22

9 Answers9

80

I realize this question is a year old - but I thought I would contribute one additional bit of info in case anyone else is Googling for this answer.

The issue only crops up on Win7 64-bit when you install Python "for all users". If you install it "for just me", you should not receive these errors. It seems that a lot of installers only look under HKEY_CURRENT_USER for the required registry settings, and not under HKEY_LOCAL_MACHINE. The page linked by APC gives details on how to manually copy the settings to HKEY_CURRENT_USER.

Or here's the PowerShell command to do this: cp -rec HKLM:\SOFTWARE\Python\ HKCU:\SOFTWARE

Tereza Tomcova
  • 4,928
  • 4
  • 30
  • 29
Andrew
  • 1,559
  • 13
  • 10
  • 10
    I was having the same error as the poster, and this worked perfectly and flawlessly for me in windows 7 64 bit. Just uninstall python, and reinstall "for just me". – convergedtarkus Feb 14 '12 at 04:11
  • 1
    Their windows 3.11 era installer sure takes me back. This answer worked great. – Inverse Apr 03 '12 at 16:00
  • This also worked for me when trying to get Pygame to play nice with Python 3.4 on Windows 7. – sleeparrow Jul 28 '14 at 22:58
57

Warning for new viewers: this answer is now several years old (the clue is that it describes Windows 7 as "new"). By now (2014) most Python libraries should have 64-bit support. However, if you still have problems you can always take the advice of @KamilSzot and install 32-bit Python instead. In most cases it probably doesn't matter that much.


[In 2010] it appears there are a lot of Python utilities which don't work on 64-bit Windows 7, as it's still a very new platform. So you may frequently find yourself on the cutting edge, which is not a comfortable place for someone who describes themselves as a beginner.

For instance, Valentine Gogichashvili discusses a potential solution here but do you know enough Python to understand what it's doing?

Community
  • 1
  • 1
APC
  • 144,005
  • 19
  • 170
  • 281
  • 8
    Thanks. Just created python_register.reg file with content that is available on the linked page and executed that file. Then tried to run installer again and it worked. – Sergiy Belozorov Apr 10 '11 at 19:20
  • 1
    Works like a charm! Python27 installing Cython, Windows 7 64-bit – Alex Jun 05 '12 at 01:51
  • Or you can just use 32-bit Python – Kamil Szot May 31 '14 at 20:01
  • Sorry. I downvoted because your answer began with unhelpful commentary that mislead me from really simple solution that was installing Python 2.7 32-bit instead of Python 2.7 64-bit. I almost abandoned library that I was trying to build because of your answer. Fortunately I wandered here https://groups.google.com/forum/#!topic/mongodb-dev/T9K_s7FI_00 – Kamil Szot May 31 '14 at 20:31
  • 1
    Four years later, this still helped me--the 32 bit installer wasn't finding my Python 2.7. I had to change all the 6s to 7s in that text but it worked like a charm – Alkanshel Nov 27 '14 at 20:10
21

For me this happens on a 32 bit system with activepython installed. It seams that the regs are not in HKEY_CURRENT_USER so here is what I do to fix that.

  1. Export the "Python" section under HKEY_LOCAL_MACHINE -> Software
  2. Open the export in notepad notepad. Replace "LOCAL_MACHINE" with "CURRENT_USER"
  3. Since I have 2.7 installed I also had to replace "2.7" with "2.6" (make sure that you do not affect the path which points to the installation of python).
  4. Over write the reg backup and run it.

Now if you run the installation of whatever package you needed it will find python. This helped in my case but be aware that it might not work for you.

TE0
  • 667
  • 6
  • 14
  • I had this problem installing dbfpy on Win 2008 Server, and this advice did the trick. Basically the addon was looking at HKEY_CURRENT_USER, and not HKEY_LOCAL_MACHINE where Python 2.7 added itself. Nice tip. – elrobis Feb 14 '12 at 22:56
  • This is the case for me, thanks a billion. I see all these 64 bit this, 64 bit that responses on google while I have 32 bit windows with 32 bit python and was wondering what was up with my config. – demongolem May 14 '12 at 15:25
2

On Feb 14 marblecatdog posted a comment to the posted answer by Andrew. I want it to be found more easily as I see several people recently getting similar trouble. This is a very likely solution for many installs. Per marblecatdog ..

I was having the same error as the poster, and this worked perfectly and flawlessly for me in windows 7 64 bit. Just uninstall python, and reinstall "for just me".

The Cause Of it All In a Nut: installed python "for all users".

Apparently, there's many python add-on, of which pyjs is one, that do not search the windows registry for the "all users" programs entries. I nearly always install for all.

My Own Problem: installing windows COM files required by python GUI add-on pyjs.

I was looking pretty desperate yesterday having invested much time and hope in pyjs. It requires "comtypes" which the windows installer for those spit up with "No Python installation found in the registry". Reinstalled python 2.7 just for me and the com-installer.exe had NO ISSUES.

Community
  • 1
  • 1
Randy Skretka
  • 3,488
  • 3
  • 22
  • 14
1

This error can occur if you are installing a package with a different bitness than your Python version. To see whether your Python installation is 32- or 64-bit, see here.

Community
  • 1
  • 1
1''
  • 26,823
  • 32
  • 143
  • 200
1

To avoid such issues I switched to activepython and its working fine till now (fingers crossed).

The community version (read free) is here - http://www.activestate.com/activepython/downloads

PlanetUnknown
  • 3,956
  • 4
  • 49
  • 67
0

maybe your installer is i386 and your computer is AMD64. try to find the right package!

hustljian
  • 965
  • 12
  • 9
0

Depending on the target build platforms and running architecture, Windows registry keys can be redirected for applications as Hans Passant points out here Getting Windows serial number (was: Getting MachineGuid from Registry). To get around this you can install the 32 bit version until the installer is changed to access the correct part of the registry.

Community
  • 1
  • 1
probably at the beach
  • 14,489
  • 16
  • 75
  • 116
0

I recently encountered a similar problem,of registry not being found when i was downloading the pyreader library .So i ran this script http://effbot.org/zone/python-register.htm.After running the script I got this remark from the IDLE.

*** Unable to register!

*** You probably have another Python installation!

(which meant the script was unable to help me)

So thought lets copy the exe file in LIB folder of python directory and after that installation was done in seconds

ishaan arora
  • 523
  • 8
  • 18