Python version 2.7 required, which was not found in the registry

The reason for this error when installing some Python Windows modules lies in: you have 64-bit Python, but a 32-bit installer of new modules.

64-bit Python installer write to: HKLM|HKCU\SOFTWARE\

while 32-bit installer looks at : HKLM|HKCU\SOFTWARE\wow6432node\ 

 

I came across this problem when I tried to install

Python Imaging Library (PIL)

which is a 32-bit installer.

 

solution 1 – manually copy the settings in registry editor (CMD->regedit ->Enter)

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\InstallPath

to

HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\InstallPath

 

Other solutions from stackoverflow.com:

Usally, you have three choices:

  • the “clean” way: use 32-bit Python if you have to use 32-bit modules or extensions
  • copy HKLM\SOFTWARE\Python to HKLM\SOFTWARE\wow6432node\Python, but this will cause problems with binary distributions
  • only use 64-bit installers (see below)
  • install pure Python modules with setuptools instead of the distutils installer

 

About these ads

5 responses to “Python version 2.7 required, which was not found in the registry

  1. It seems that PIL only works well with 32-bits Python, you can test by
    import _imaging
    to see if your Python version is suitable or not.

  2. dasmygatfu

    Assuming you installed to “c:\program files\python27″, use this registry path and run the PIL installation as administrator:

    (save the following as import.reg and run it)

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath]
    @=”C:\\Program Files\\Python27\\”

  3. Sandeep

    Thank you for your post. It helped clear up the confusion for me!

  4. You’ll find it isn’t just a 32bit vs 64bit issue.

    Python appears to update the registry under HKEY_CURRENT_USER and some install look for python under HKEY_LOCAL_MACHINE.

    So a 64-bit lib install into 64-bit python can still get the same error message. It is actually a deployability problem with the lib installer as it doesn’t actually take too much trouble to look in both places.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

生活在西班牙

自己动手丰衣足食

BlueAsteroid

Just another WordPress.com site

Jing's Blog

Just another WordPress.com site

Start from here......

我的心情魔方

天才遠私廚

希望能做一個分享各種資訊的好地方

语义噪声

西瓜大丸子汤的博客

Augmented Reality Blog

An augmented point of view

笑对人生,傲立寰宇

Just another WordPress.com site

Where On Earth Is Waldo?

A Project By Melanie Coles

the Serious Computer Vision Blog

A blog about computer vision and serious stuffs

Cauthy's Blog

paper review...

Cornell Computer Vision Seminar Blog

Blog for CS 7670 - Special Topics in Computer Vision

datarazzi

Life through nerd-colored glasses

Luciana Haill

Augmenting Consciousness with EEG

槑烎

1,2,∞

Paul Tennent

Wanderings in the Blogosphere

turn off the lights, please

A bunch of random, thinned and stateless thoughts around the Web

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: