且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将 Python 添加到 Windows 注册表

更新时间:2023-11-25 07:54:10

我遇到了同样的问题.我通过

解决了它
  1. 导航到 HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\InstallPath 并使用以下输出编辑默认键C:\>where python.exe 命令.
  2. 导航到 HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\InstallPath\InstallGroup 并使用 Python 3.4
  3. 编辑默认键

注意:我的python版本是3.4,你需要用你的替换3.4python版本.

通常,您可以在 HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\ 中找到 Python 的注册表项.您只需要将这些条目复制到 HKEY_CURRENT_USER\Software\Python\PythonCore\

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?

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>