“Python Version 2.7 required which was not found in the registry”


Introduction
Any module installer that is created using distutils (bdist_wininst) is very likely to produce this error. The problem is that it only detects 32bit installations of Python on 64bit Windows machines. Or more technically, 32bit versions of Python create the following registry path

HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore

while 64bits versions create a slightly other registry path which is

HKEY_CURRENT_USER\Software\Python\PythonCore

When any 32-bit module setup is started (with a Python 64-bit on your system), it first checks whether the first path exists, while instead it should check the second (which does exist).

There are basically three ways of solving this:

  • You can install a 32-bit Python version
  • or install a 64-bit version of your module
  • or adjust the registry such that it really sees that a 64bit Python is installed

I will of course elaborate on the last two options.

Install a 64-bit version of your module

You can find many module binaries here. Choose a 64-bit version and install it. This is the most clean way of fixing the problem.

If your module is not in the list, then try the alternative below.

Fix by adjusting the registry

So the dirty way is to do the following adjustments in the registry:

  1. Run regedit.
  2. Locate the path: HKEY_CURRENT_USER\Software\Wow6432Node\
  3. Create keys in this path: Python\PythonCore\2.7\InstallPath
  4. Modify the “(Default)“, which is initially empty, to the path where Python is located, for example “C:\Python27\”.
  5. You are done. Exit and retry the setup that gave the error.

You can alternatively create a .reg file (for example fix.reg) that will do the above steps automatically. Put exactly the following in it:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath]
@="C:\\Python27\\"

If you are lazy, then you can also download this file, unpack the registry file and just run it.

 

3 thoughts on ““Python Version 2.7 required which was not found in the registry””

  1. For Windows 7 (64 bits):-
    Use Registry Editor to Adjust the followings:

    Run regedit on Run CommandLine.
    Locate the path: HKEY_CURRENT_USER\Software\
    Create keys in this path: Python\PythonCore\2.7\InstallPath\InstallGroup\
    Modify the “(Default)“ of both InstallPath and InstallGroup, which is initially empty, to the path where Python is located, for example “C:\Python27\” for InstallPath and “Python 2.7” for InstallGroup.
    You are done. Exit and retry the setup that gave the error.

  2. Does your blog have a contact page? I’m having a tough time locating it but, I’d like to
    send you an e-mail. I’ve got some recommendations for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it expand over time.

  3. Howdy just wanted to give you a quick heads up and let you know a few of the pictures aren’t loading correctly. I’m not sure why but I
    think its a linking issue. I’ve tried it in two different browsers and both show the same results.

Leave a Reply

Your email address will not be published. Required fields are marked *