gpt4 book ai didi

python-3.x - Pip无法安装任何包

转载 作者:行者123 更新时间:2023-12-03 19:46:21 27 4
gpt4 key购买 nike

您好大约 2 周前,我开始无法下载 python 包,甚至无法访问在 chrome 和 firefox 上“无法访问”的 pypi 网站。

当我尝试下载一个包时,它给了我这个:

$ python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
Collecting numpy
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/numpy/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/numpy/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/numpy/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/numpy/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/numpy/
Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy

我不知道为什么会发生这种情况,我没有对我的计算机进行任何更改,有一天它才开始在我的两台计算机上执行此操作,我不明白。
有人知道为什么会这样吗?我搜索了几个小时,但找不到任何东西来纠正这个错误。

我尝试过的:
- 卸载每个python程序并重新安装
- 检查我的驱动程序(你永远不知道)
- 停用任何代理
- 禁用我的防火墙

操作系统:Windows 10

最佳答案

所以对于任何寻找解决方案的人,我发现这可能不是最佳的,但至少它有效,而不是 pip install package 使用这个命令

python.exe -m pip 安装包 --proxy="proxy:port"

您可以在此处找到大量免费代理列表:https://free-proxy-list.net/ (请注意,并非所有这些都有效,您可能想尝试多个,然后再获得一个有效的)

例如,您可以使用:
python.exe -m pip install numpy --proxy="179.185.199.195:8080"

这有效,
施兰德

关于python-3.x - Pip无法安装任何包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52328655/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com