python -m pip install -U pip Errno 11004

标签 python python-3.x pip

我正在尝试更新 pip,但我不断收到以下消息:

H:\>python -m pip install -U pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con
nection.VerifiedHTTPSConnection object at 0x031AF3B0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con
nection.VerifiedHTTPSConnection object at 0x031AF3D0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con
nection.VerifiedHTTPSConnection object at 0x031AF110>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con
nection.VerifiedHTTPSConnection object at 0x031AF0B0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.con
nection.VerifiedHTTPSConnection object at 0x031AF170>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',)': /simple/pip/
Requirement already up-to-date: pip in c:\users\a256886\appdata\local\programs\python\python36-32\lib\site-packages

我安装了 python 3.6.1,当我运行 pip --version 我看到 pip 9.0.1。

为什么我不能更新?或者使用 pip 安装任何软件包?怎么了?我该如何解决?

最佳答案

你在代理后面。正如您所发现的,您可以将代理传递给 pip使用 --proxy争论:

python -m pip install -U pip --proxy http://username:password@proxy_url:port

或者
pip install --upgrade pip --proxy http://username:password@proxy_url:port

该文档在这里令人困惑,因为它没有提到将协议(protocol)作为代理定义的一部分传递的要求。

关于python -m pip install -U pip Errno 11004,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44950994/

相关文章:

python - 快速搜索两个列表中的所有元素

python - 我怎样才能要求从元类的抽象方法中调用 super() ?

python - 导入 tensorflow 模块时出错

python - 无法安装 Django

python-3.x - pip 安装私有(private) Github 存储库的简单方法?

python - 在 Django ModelAdmin 中列出相关字段

python - Tkinter,更改按钮及其命令

python - 设置 pandas 打印输出的列宽

python-3.x - pyinstaller 创建的可执行文件不运行

python - 网页抓取:访问大列表中的文本信息