py启动器找不到我的Python 2.7 [英] py launcher does not find my Python 2.7
问题描述
我在Windows 7上.我已经安装Python 2.7多年了.我最近安装了Python 3.4.我正在尝试使用新的py启动器.当我打开cmd终端并键入py -2
时,出现以下错误消息:Requested Python version (2) not installed
.如何让py知道我的python 2.7安装?
I'm on Windows 7. I have Python 2.7 installed for years. I installed recently Python 3.4. I'm trying to use the new py launcher. When I open the cmd terminal and type py -2
, I get this error message: Requested Python version (2) not installed
. How can make py aware of my python 2.7 installation?
注意:python 2.7安装在非标准目录中(不在C:\ Python27中),以防出现问题.
Note: python 2.7 is installed in a non-standard directory (not in C:\Python27), in case this is the problem.
推荐答案
我找到了解决方案.注册表输入错误.因为我安装了32位版本,所以我转到了HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER\SOFTWARE\wow6432node\Python\PythonCore\2.7\InstallPath
,并且在我的安装位于D:\Python27
时,该值设置为C:\Python27
.因此,我更改了所有注册表值以匹配正确的位置,现在可以正常使用了.
I found the solution. The registry had wrong entries. As I have a 32 bit version installed I went to HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER\SOFTWARE\wow6432node\Python\PythonCore\2.7\InstallPath
and the value was set to C:\Python27
while my installation is in D:\Python27
. So I changed all the registry values to match the correct location and it now works fine.
安装Python 2.7已经有一段时间了,但是我想我首先安装了Python 2.7.然后我将其删除并在此新位置安装了pythonxy.我可能没有正确卸载以前的版本.
It's been quite a while I installed Python 2.7, but I assume I had Python 2.7 installed first. Then I deleted it and installed pythonxy in this new location. I probably didn't uninstall the previous version correctly.
这篇关于py启动器找不到我的Python 2.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!