py启动器找不到我的Python 2.7 [英] py launcher does not find my Python 2.7

查看:186
本文介绍了py启动器找不到我的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆