36

I've downloaded Enthought Canopy EPD Free (now Canopy Express) from https://www.enthought.com/products/epd/free/ and want to install SciKit Learn (http://sourceforge.net/projects/scikit-learn/files/) which is not part of the basic EPD Free install.

When trying to install it does not find Python in the Windows registry. How do I adjust the registry so that it recognizes the Enthought version of Python?

2
  • 1
    Also see the relevant PEP 514 python.org/dev/peps/pep-0514 Commented Dec 22, 2016 at 22:03
  • This also fixed the problem for ReportLab Commented Oct 9, 2017 at 19:46

6 Answers 6

35

I faced to the same problem. I solved it by

  1. navigate to HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\InstallPath and edit the default key with the output of C:\> where python.exe command.
  2. navigate to HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\InstallPath\InstallGroup and edit the default key with Python 3.4

Note: My python version is 3.4 and you need to replace 3.4 with your python version.

Normally you can find Registry entries for Python in HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\<version>. You just need to copy those entries to HKEY_CURRENT_USER\Software\Python\PythonCore\<version>

Sign up to request clarification or add additional context in comments.

3 Comments

I had the same problem, and thanks to @Sameera Nandasiri, I was able to solve it. I just wanted to add a tip about copying the registry entries over. There may be a better way, but what I did is export the Python key at "HKEY_LOCAL_MACHINE\SOFTWARE\Python" to a .reg file, edited it to replace all text : "HKEY_LOCAL_MACHINE\SOFTWARE" with "HKEY_CURRENT_USER\Software" and then re-imported the reg file.
@RufusVS Same solution is mentioned here: github.com/rfk/pyenchant/issues/96
Related for the Python Image Library: stackoverflow.com/questions/14177000/…
9

You can find the Python executable with this command:

C:\> where python.exe

It should return something like:

C:\Users\<user>\AppData\Local\enthought\Canopy32\User\python.exe

Open regedit, navigate to HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\<version>\PythonPath and add or edit the default key with this the value found in the first command. Logout, login and python should be found. SciKit can now be installed.

See Additional “application paths” in https://docs.python.org/2/using/windows.html#finding-modules for more details.

3 Comments

I'm using HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\<version>\InstallPath
Yes, but the question is about "Enthought version of Python". I guess Enthought adds specific modules to its own Python version.
On my system, InstallPath is the location where Python is installed C:\Python\p27 and PythonPath includes C:\Python\p27\Lib;C:\Python\p27\DLLs;C:\Python\p27\Lib\lib-tk which helps the Python runtime find modules, support DLLs, etc. I think of PythonPath as functioning similar to the Windows PATH environment variable.
6

I had the same issue while trying to install bots on a Windows Server. Took me a while to find a solution, but this is what worked for me:

  1. Open Command Prompt as Administrator
  2. Copy this: reg add HKLM\SOFTWARE\Python\PythonCore\2.7\InstallPath /ve /t REG_SZ /d "C:\Python27" /f and tailor for your specifications.
  3. Right click and paste the tailored version into Command Prompt and hit Enter!

Anyway, I hope that this can help someone in the future.

3 Comments

I just want to mention that I had this written for internal documentation and instructions and thought I would share it!
Can you explain what each of the flags mean in the reg add command?
/ve Specifies that the registry entry that is added to the registry has a null value /t <Type> Specifies the type for the registry entry /d <Data> Specifies the data for the new registry entry /f Adds the registry entry without prompting for confirmation. Article Here
3

In case that it serves to someone, I leave here the Windows 10 base register for Python 3.4.4 - 64 bit:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.4]
"DisplayName"="Python 3.4 (64-bit)"
"SupportUrl"="http://www.python.org/"
"Version"="3.4.4"
"SysVersion"="3.4"
"SysArchitecture"="64bit"

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\Help]

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\Help\Main Python Documentation]
@="C:\\Python34\\Doc\\python364.chm"

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\Idle]
@="C:\\Python34\\Lib\\idlelib\\idle.pyw"

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\IdleShortcuts]
@=dword:00000001

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\InstalledFeatures]

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\InstallPath]
@="C:\\Python34\\"
"ExecutablePath"="C:\\Python34\\python.exe"
"WindowedExecutablePath"="C:\\Python34\\pythonw.exe"

[HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\PythonPath]
@="C:\\Python34\\Lib\\;C:\\Python34\\DLLs\\"

Comments

0

When installing Python 3.4 the "Add python.exe to Path" came up unselected. Re-installed with this selected and problem resolved.

Comments

0

I installed ArcGIS Pro 1.4 and it didn't register the Python 3.5.2 it installed which prevented me from installing any add-ons. I resolved this by using the "reg" command in an Administrator PowerShell session to manually create and populate the necessary registry keys/values (where Python is installed in C:\Python35):

reg add "HKLM\Software\Python\PythonCore\3.5\Help\Main Python Documentation" /reg:64 /ve /t REG_SZ /d "C:\Python35\Doc\Python352.chm"
reg add "HKLM\Software\Python\PythonCore\3.5\InstallPath" /reg:64 /ve /t REG_SZ /d "C:\Python35\"
reg add "HKLM\Software\Python\PythonCore\3.5\InstallPath\InstallGroup" /reg:64 /ve /t REG_SZ /d "Python 3.5"
reg add "HKLM\Software\Python\PythonCore\3.5\PythonPath" /reg:64 /ve /t REG_SZ /d "C:\Python35\Lib;C:\Python35\DLLs;C:\Python35\Lib\lib-tk"

I find this easier than using Registry Editor but that's solely a personal preference.

The same commands can be executed in CMD.EXE session if you prefer; just make sure you run it as Administrator.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.