How to add Python to Windows registry
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?
Solution 1:
I faced to the same problem. I solved it by
- navigate to
HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\InstallPath
and edit the default key with the output ofC:\> where python.exe
command. - navigate to
HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\InstallPath\InstallGroup
and edit the default key withPython 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>
Solution 2:
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.
Solution 3:
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:
- Open Command Prompt as Administrator
- Copy this:
reg add HKLM\SOFTWARE\Python\PythonCore\2.7\InstallPath /ve /t REG_SZ /d "C:\Python27" /f
and tailor for your specifications. - Right click and paste the tailored version into Command Prompt and hit Enter!
Anyway, I hope that this can help someone in the future.
Solution 4:
English
In case that it serves to someone, I leave here the Windows 10 base register for Python 3.4.4 - 64 bit:
Español
Por si alguien lo necesita todavía, este es el registro base de Windows 10 para Python 3.4.4:
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\\"