[英]python --version not working on Windows command prompt but installed
there I'm trying to install pip and have begun by installing python.在那里我正在尝试安装 pip 并从安装 python 开始。 I've installed python via an exe.我已经通过 exe 安装了 python。 However when I do basic things such as checking the version it says not found.但是,当我执行基本操作(例如检查版本)时,它说未找到。 I can run python in the command prompt by typing py
.我可以通过键入py
在命令提示符下运行 python。
However when it type: python --version
it says not found?但是,当它输入: python --version
它说找不到? I've also tried python3 --version
and using a capital P, to no avail?我也试过python3 --version
并使用大写 P,但无济于事? as such running py get-pip.py is not working stating not found.因此,运行 py get-pip.py 无法正常工作,说明未找到。 please can someone assist?请有人帮忙吗?
Maybe you should reinstall it.也许你应该重新安装它。 Probably it is because of the setup wizard可能是因为设置向导
Check if your environment variables are correctly set.检查您的环境变量是否设置正确。 Under "Path" there should be a line leading to your python folder somewhere.在“路径”下,应该有一行指向您的 python 文件夹。 For me, the path is "C:\\Users\\myUsername\\AppData\\Local\\Programs\\Python\\Python39\\"
.对我来说,路径是"C:\\Users\\myUsername\\AppData\\Local\\Programs\\Python\\Python39\\"
。 You may need to restart your PC after changing something in the environment variables for it to take effect.您可能需要在更改环境变量中的某些内容后重新启动 PC 才能使其生效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.