Python 未被识别为 Windows 7 中的内部或外部命令

标签 python cmd path

我已经从 this 安装了 python 2.7.11 链接,然后重新启动我的系统。但是,当我转到 cmd 并运行 python --version 时。它给我一个错误

python not recognized as an internal or external command.

所以我尝试手动将它添加到我的 Path 变量 我看到我的 python 安装在 C:\Python27 所以我添加 someotherpath;C:\Python27 到路径变量并重新打开 windows cmd。但它仍然给我同样的错误。

有没有其他方法可以解决这个问题。

谢谢

最佳答案

请在命令提示符下运行以下命令。

echo %PATH% It should have whatever path you have set manually. Otherwise Open a new Command prompt and try the same command. Run python

如果在那之后它不工作。

请检查 Python.exe 在 C:\Python 中是否可用?

关于Python 未被识别为 Windows 7 中的内部或外部命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39992339/

相关文章:

java - 获取资源路径

python - isinstance(xxx, property) 可以工作,但是它在 types 模块中对应什么?

Python游戏结束屏幕不接受输入

java - 文件类中的新 BufferedReader 无法应用于给定类型

c - 如何删除C中上面几行的书面文字?

cmd - Jenkins 下 Gradle 和 UNC 路径的问题

java - 无法从资源文件夹中读取文件

Python:将类变量字符串转换为类类字符串

python - 如何使用 Python 打开 "~/.bash_profile"

java - 在提示输入后添加文本