简体   繁体   English

安装后运行 pip 时遇到问题?

[英]I have problems running pip after installing?

I installed pip on my windows 10 with python 3.8.3 already there.我在我的 windows 10 上安装了 pip 和 python 3.8.3。 The command prompt displays the message 'successfully installed pip latest version'.I have checked in the environment variables and done what was needed through tutorials.命令提示符显示消息“已成功安装 pip 最新版本”。我已经检查了环境变量并通过教程完成了所需的操作。 After that it stopped saying that: pip is not recognized as an internal or external program or batch file之后它停止说: pip is not recognized as an internal or external program or batch file

But then when I entered 'pip --version' in the command prompt, it said invalid syntax.但是当我在命令提示符下输入“pip --version”时,它说语法无效。 I downloaded the get-pip.py file too, ran it and it installed all the dependencies and everything but the command prompt still said invalid syntax.我也下载了get-pip.py文件,运行它并安装了所有依赖项和所有内容,但命令提示符仍然显示无效语法。 What should I do?我应该怎么办? I am a new self-taught programmer.我是一个新的自学程序员。 Help please.请帮忙。

I would suggest you that you try ensurepip command first and then try to check the version using:我建议您先尝试 ensurepip 命令,然后尝试使用以下命令检查版本:

python -m ensurepip --user python -m ensurepip --user

python -m pip --version python -m pip --version

The ensurepip should fix your installation problems if any. ensurepip 应该可以解决您的安装问题(如果有)。

If ensurepip takes you back to the older installation, use the below command to upgrade it: python -m pip install --user --upgrade pip如果 ensurepip 带您回到旧安装,请使用以下命令对其进行升级: python -m pip install --user --upgrade pip

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM