I cannot install numpy because it can't find python 2.7, althought I have installed python

Question:

I cannot install numpy because it can’t find python 2.7, althought I have installed python.

I have message: “Python version 2.7 required, which can’t find in registry”

Do have a solve of my problem?

Asked By: kspacja

||

Answers:

You have to mach the versions of python and numpy. Both need to be 32 bit or 64 bit.

Answered By: user850498

You should install Python 32bit, or use the numpy package for python 64bit from this unofficial site

Answered By: Kien Truong

This is not uncommon with installers (e.g. Numpy) that depend on or look for a previously installed 64 bit core application (e.g. Python x64). The problem and solution are easy to explain.

PROBLEM
IMHO this is an error on the part of the developer of the already-installed 64 bit applicaiton by placing the registry entry in the 32 bit node rather than (or in addition to) the 64 bit node. Actually, the developer of the installer could also code it to look in both locations as well, rather than just assuming the 64 bit application registry entry will be in Wow6432Node, as a way of avoiding this problem of the original developer’s oversight; however, if the installer bases its decision on whether the app is 32- or 64 bit based on the location of the registry entry (not a good idea), this could be problematic.

Occassionally with 64 bit applicaitons a registry entry will be created in…

HKLMSOFTWARE[applicaion name]

However, a corresponding registry entry is not created in…

HKLMSOFTWAREWow6432Node[application name]

SOLUTION
The easiest way to resolve this with any applicaiton is to…

  1. Open the registry editor (START –> RUN –> regedit)
  2. Navigate to HKEY_LOCAL_MACHINESOFTWARE [applicaiton name] (in this case “Python”)
  3. Right click on the applicaiton (“Python”)
  4. Select “Export” and save the file somewhere as “[application name].reg” (“Python.reg”)
  5. Open the saved file with your editor of choice (I like Notepad++)
  6. On each entry right after “[HKEY_LOCAL_MACHINESOFTWARE” but before [applicaiton name] (“Python”), add “Wow6432Node” (without the quotes, obviously)
  7. Save the edited file as “[application name]_64.reg” (Python_64.reg”)
  8. Close the editor and double-click on the newly created file, answer “Yes” to the Registry Editor verification popup.

Now you should have duplicate entries in HKLMSOFTWARE [applicaiton name] and HKLMSOFTWAREWow6432Node [applicaiton name]. Alternatively, you could manually create all the missing entries under HKLMSOFTWAREWow6432Node [applicaiton name] to match what is in HKLMSOFTWARE [application name], but that’s really the long way around.

When you re-run the Numpy installer, it will now properly detect your 64 bit installation of Python.

CAVEAT
There is a caveat to all this.

The duplicate entries in HKLMSOFTWARE and HKLMSOFTWAREWow6432Node are not a problem and will not affect normal operation of an application; however, as the developer missed creating the Wow6432Node registry entry, it’s unlikely that any future updates that modify the registry entries will be populated in both locations. You may occassionally have to either perform this operation again or manually add new registry entries to the Wow6432Node in order to keep them consistent. An example where you might run into this is with the installation of Python modules that add an entry under HKLMSOFTWAREPythonPythonCore2.xModules . You can export just the added entry and edit the .reg file to include “Wow6432Node” only, export the entire Python node and edit all entries (importing the edited .reg file will overwrite existing entries), or just manually add the new entry – whatever seems simpler to you.

Answered By: RMWChaos

This problem also affects 32-bit numpy on 32-bit Python.

The cause is that the numpy installer assumes you opted for “install for all users” when you installed Python, i.e. that the Python installer used the machine-wide HKEY_LOCAL_MACHINE part of the registry.
If you instead chose “install for me only“, those registry settings are in the user-writable section of the registry, *HKEY_USERS_* (a.k.a. HKEY_CURRENT_USER).
The numpy installer does not look there and therefore thinks that Python is not installed.

Solution:
Copy the key HKEY_CURRENT_USERSoftwarePython and all sub-keys to the corresponding place under HKEY_LOCAL_MACHINESoftware (you can do this with Export from regedit, then find&replace in the text file, then import). Or, reinstall Python and choose “all users”.

Answered By: DaveS

Uninstall Python from your system and reinstall once again . Then download numpy from this site : http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

In case you want to check the version of numpy on your system , write this following code on your IDE :

import numpy
numpy.version.version

Hope this would help !

Answered By: murasing

You should install python 2.7 32bit. The numerical python windows version are all 32bit.

Answered By: goudan-er
  1. Run installer

  2. Click cancel when error shows up

  3. Click show details

  4. It will say at the end of the list Execute: C:.........numpy-1.7.1-sse3.exe, go to that folder, grab that file and drop it in C:python27

  5. Once it’s in said folder, run it from that location. Setup will run and find it.

Answered By: Andy
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.