简体   繁体   English

在 Windows 10 上安装 PIP 时如何修复此错误?

[英]How can you fix this error while installing PIP on Windows 10?

I am trying to install pip on my Windows machine.我正在尝试在我的 Windows 机器上安装 pip。 I get the latest version of get-pip.py from https://bootstrap.pypa.io/我从https://bootstrap.pypa.io/获取最新版本的 get-pip.py

Then, I fire up the command prompt, locate get-pip.py on my system and try the command:然后,我打开命令提示符,在我的系统上找到get-pip.py并尝试以下命令:

python get-pip.py

Everytime I try this, I get the following error:每次我尝试这样做时,都会出现以下错误:

在此处输入图片说明

Please help!请帮忙!

two initial things:最初的两件事:

1) what version of python have you installed? 1)你安装了什么版本的python? new versions come with pip installed by default.新版本默认安装了 pip。 2) have you tried running cmd as administrator ? 2)您是否尝试过以管理员身份运行 cmd ? ive had issues with stuff in the past that running cmd as admin has resolved.我过去遇到过以管理员身份运行 cmd 已经解决的问题。

let us know!让我们知道!

Another possible solution is to set the proxy for Windows.另一种可能的解决方案是为 Windows 设置代理。 In the command prompt do the following.在命令提示符下执行以下操作。

set HTTP_PROXY="http://username:password@proxy_address:proxy_port"
set HTTPS_PROXY="http://username:password@proxy_address:proxy_port" 

Notice that both the HTTP and the HTTPS proxy use the EXACT same string.请注意,HTTP 和 HTTPS 代理都使用完全相同的字符串。

You can try downloading the file manually and install https://bootstrap.pypa.io/get-pip.py您可以尝试手动下载文件并安装https://bootstrap.pypa.io/get-pip.py

  1. Download the get-pip.py installer script.下载 get-pip.py 安装程序脚本。
  2. Open the Command Prompt and navigate to the get-pip.py file打开命令提示符并导航到 get-pip.py 文件
  3. Run the following command: python get-pip.py运行以下命令:python get-pip.py

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

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