[英]PIP Prevent connection to pypi.python.org while doing installation from local folder
On trying to do a install via PIP like below 尝试通过如下所示的PIP进行安装
sudo pip install --verbose -U --allow-unverified --no-index --find-links=/tmp/chef-cache/patroni patroni[zookeeper]==1.4.4
I am seeing pip is trying to connect to pypi.python.org 我看到pip试图连接到pypi.python.org
Getting page https://pypi.python.org/simple/patroni/
Starting new HTTPS connection (1): pypi.python.org
Incremented Retry for (url='/simple/patroni/'): Retry(total=4, connect=None, read=None, redirect=None)
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(99, 'Cannot assign requested address'))': /simple/patroni/
Starting new HTTPS connection (2): pypi.python.org
Incremented Retry for (url='/simple/patroni/'): Retry(total=3, connect=None, read=None, redirect=None)
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(99, 'Cannot assign requested address'))': /simple/patroni/
Starting new HTTPS connection (3): pypi.python.org
The set-up does not have access to outside IP. 该设置无法访问外部IP。 Is there a way I can prevent pip from trying to connect to
pypi.python.org
? 有没有一种方法可以防止pip尝试连接到
pypi.python.org
?
NOTE - The installation is happening fine. 注意-安装进行得很好。 But it is taking more time as it is trying to connect to
pypi.python.org
and then getting timed out, thereby slowing the installation. 但是,由于要尝试连接到
pypi.python.org
然后超时,因此花费了更多时间,从而减慢了安装速度。
This looks like an issue with PIP 7.1.2. 这看起来像是PIP 7.1.2的问题。 The issue is not observed in the latest PIP 18.0.
在最新的PIP 18.0中未观察到此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.