Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ';ReadTimeoutError';其次是';未找到X'的匹配分布;尝试使用pip下载软件包时 更新-问题部分解决,请参见问题底部_Python_Pip_Ubuntu 20.04_Pyenv - Fatal编程技术网

Python ';ReadTimeoutError';其次是';未找到X'的匹配分布;尝试使用pip下载软件包时 更新-问题部分解决,请参见问题底部

Python ';ReadTimeoutError';其次是';未找到X'的匹配分布;尝试使用pip下载软件包时 更新-问题部分解决,请参见问题底部,python,pip,ubuntu-20.04,pyenv,Python,Pip,Ubuntu 20.04,Pyenv,所以,我已经看过了每一篇类似的文章,但没有一篇能为我的病情提供解决方案 我刚刚格式化了我的笔记本电脑并安装了Ubuntu20.4LTS。 然后,我建立了一个pyenv布局并下载了python3.6.0/3.6.4/3.7.0/3.8.0/3.9.0,并确保每一个版本都有其对应的最新pip版本。(从3.6.0的9.0.1到3.9.0的20.2.3)。(此外,目前还没有定义“系统”python版本) 现在,我尝试使用pip下载软件包numpy==1.14.2,并仔细阅读了我在web上找到的所有建议:

所以,我已经看过了每一篇类似的文章,但没有一篇能为我的病情提供解决方案

我刚刚格式化了我的笔记本电脑并安装了Ubuntu20.4LTS。 然后,我建立了一个pyenv布局并下载了python3.6.0/3.6.4/3.7.0/3.8.0/3.9.0,并确保每一个版本都有其对应的最新pip版本。(从3.6.0的9.0.1到3.9.0的20.2.3)。(此外,目前还没有定义“系统”python版本)

现在,我尝试使用pip下载软件包numpy==1.14.2,并仔细阅读了我在web上找到的所有建议:

  • pip安装numpy==1.14.2
  • pip3“
  • pip3.6“
  • pip安装--用户“
  • pip安装--默认超时=1000“
  • python-mpip安装“
  • sudo“”
这些尝试大多使用多个python(因此对应的pip)版本作为pyenv global进行

每一次尝试都以这种方式结束:

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/numpy/
  Could not find a version that satisfies the requirement numpy==1.14.2 (from versions: )
No matching distribution found for numpy==1.14.2
我觉得很奇怪,于是尝试使用pip获取其他包,并意识到它根本无法检索任何包

*增加了澄清-这包括简单的“pip install numpy”,它给出了相同的错误

我怀疑与服务器通信的实际能力,于是ping了它,但所有的数据包都通过并得到了确认

我一直在追求这一思路,并尝试:

curl https://pypi.org
导致:

curl: (28) Operation timed out after 300355 milliseconds with 0 out of 0 bytes received
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('timed out'))': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy==1.14.2 (from versions: none)
ERROR: No matching distribution found for numpy==1.14.2
然后尝试:

pip install numpy==1.14.2 --proxy http://pypi.org:443
导致:

curl: (28) Operation timed out after 300355 milliseconds with 0 out of 0 bytes received
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('timed out'))': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response'))': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy==1.14.2 (from versions: none)
ERROR: No matching distribution found for numpy==1.14.2
有谁能帮助一个痛苦的灵魂,尝试建立一个简单的DRL乐趣练习环境?我错过了什么

提前谢谢

-----编辑-----

继CoderRambo的评论之后,值得一提的是,我使用的python和相应的pip版本符合numpy1.14.2页面上描述的限制:


更新-我尝试使用我的智能手机的网络数据,而不是我的WIFI连接…哇,瞧!它成功了

实际上,我仍然想弄清楚这里到底发生了什么,因为我显然不打算每次需要使用pip时都使用手机的热点

值得一提的是,我在过去成功地将pip与我当前的WIFI结合使用,因此我想知道这个问题的根源是什么。这是我的网络供应商内置防火墙的固有变化吗?还是新安装的操作系统

更有可能是操作系统,但据我所知,Ubuntu没有内置防火墙,而且我不会主动(或有意)使用任何代理服务器


关于如何处理这一问题的建议?有人吗?

自从我使用公司VPN以来,我也曾面临过这个问题。您是否连接到公司的VPN软件(如Cisco Anyconnect)并尝试此功能?如果是这样,请尝试断开VPN连接,只连接到您的WIFI,然后下载。如果是这样的话,请告诉我,否则我们可以进行调查。

我为这个问题挣扎了整整一天,直到找到那篇帖子:

我将这两行添加到我的/etc/hosts文件中,它解决了这个问题:

151.101.0.223 pypi.org
151.101.1.63 files.pythonhosted.org

不幸的是,事实并非如此。我没有使用任何VPN服务,只通过我私人住宅的wifi直接连接,我很想听听你关于我们应该如何进一步调查此事的想法。非常感谢。好的,很抱歉听到这个消息。我刚才看到您正在尝试安装numpy==1.14.2,如果您看到它需要的链接:Python>=2.7=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*在python3.6.0/3.6.4/3.7.0/3.8.0/3.9.0的例子中,python是>=3.6.*所以我建议您使用常规安装“pip install numpy”,或者如果您的情况需要1.14.2,那么安装python 2.7,看看它是否可以工作。请让我知道这是否有帮助,如果没有,我们可以寻找其他的可能性。谢谢谢谢,我忘了提到这些python版本限制已经考虑在内了,只是简单地尝试了“pip install numpy”。编辑。另外,我现在尝试使用Python2.7.13,但它给出了相同的错误:/ok感谢您检查2.7版。你能键入这个命令并告诉我你得到了什么输出吗。命令是“which pip”,请键入它而不加引号,并告诉我输出是什么??请查看我在文章底部的最新更新。问题现在缩小到一些连接/阻塞问题。谢谢