我需要使用pip下载软件包。我运行了pip install <package>
,但有以下错误:
[user@server ~]$ pip install sistr_cmd
Collecting sistr_cmd
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0cd90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0c290>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0c510>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0cf10>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.
VerifiedHTTPSConnection object at 0x7f518ee0c190>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/sistr-cmd/
Could not find a version that satisfies the requirement sistr_cmd (from versions: )
No matching distribution found for sistr_cmd
我验证了问题的来源是网络阻止大多数站点,因为我在代理后面(由组织要求(工作。为了允许这些下载,我需要编译下载源的URL列表,然后将其发送到网络管理员到Unblock。
根据PIP文档(在Pip Wikipedia文章中的简要中引用并在摘要中进行了解释(:"在包装及其依赖项的默认源中可以找到许多软件包 - Python软件包索引(PYPI(,所以我去了PYPIBiopython的页面并找到了GITHUB存储库和包装的所需依赖项。PYPI页面上也有下载链接,我想确保允许下载的所有源。软件包(github存储库或原始软件包托管的何处(,下载的PYPI页面中列出的软件包,或者它是通过两者搜索的?
预先感谢您的帮助。
它看起来是网络连接,以后您可以在下面尝试:
pip install sistr-cmd
有关更多信息,请参见-
和_
之间的区别
根据用户abarnert:
"如果您使用--verbose
标志运行pip
,它将向您显示其考虑的所有链接。一般而言,它首先转到https://pypi.org/simple/{PACKAGE}
。该页面将具有用于车轮的下载链接,并提供了维护者拥有的所有版本的源已上传,它将通过按顺序尝试其链接来寻找适当的版本的轮子。通常没有github repo列出为源。
如果您想安装您所知道的GitHub(或任何其他位置(的所有内容,那么最简单的事情就是手动将存储库提供给PIP,而不仅仅是包装名称。理想情况下,将您关心的所有内容安装在没有从大多数Internet上进行防火墙的机器上,构建需求。"
使用--verbose
标志运行pip install
,显示了有关该软件包从何处和网络连接和追踪的广泛细节。