简体   繁体   English

python --version 不适用于 Windows 命令提示符但已安装

[英]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可能是因为设置向导

It looks like a issue with Path variables.看起来像路径变量的问题。 Try this : here试试这个: 在这里

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 才能使其生效。

You can use py --version to get the python version您可以使用py --version获取 python 版本

在此处输入图片说明

To install pip use these commands要安装pip使用这些命令

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
py get-pip.py

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows命令提示不适用于Python - Windows Command Prompt Not working From Python 每当我在命令提示符下运行 python 时都会发出警告(我已经在我的 windows 8.1 操作系统上安装了 anaconda 最新版本) - Warning whenever i run python in my command prompt ( i have installed anaconda latest version on my windows 8.1 os) (Windows 11) 命令提示符无法识别 Python (3.10.6) 已安装? - (Windows 11) Command Prompt doesn't recognize that Python (3.10.6) is installed? 如果我安装了 2 个 python 版本,如何在命令提示符中更改 python 版本 - How to change python version in command prompt if I have 2 python version installed 在命令行上,Windows 10 不显示安装了哪个 Python 版本 - On a command line Windows 10 doesnt show which Python version is installed 无法在 Windows 命令行中检查已安装的 Python 版本 - Cannot Check Installed Python Version in Windows Command Line Python 命令在命令提示符下不起作用 - Python command not working in command prompt Python 模块请求在 anaconda 提示符下工作但不在 Windows 10 命令行中工作 - Python module requests working in anaconda prompt but not in windows 10 command line Python 在 Windows 上操作命令提示符 - Python manipulating command prompt on windows Python 在 Anaconda 提示符下工作,但不在命令提示符下 - Python is working in Anaconda prompt but not in command prompt
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM