pip in virtualenv gets ConnectTimeoutError

♀尐吖头ヾ 提交于 2019-12-10 23:23:33

问题


I'm current attempting to install packages in a python-3.4 virtualenv and I keep getting these Retry/TimeoutErrors.

(backend)root@XXXX:/var/virtualenvs# pip3 install -r backend-freeze.txt
Collecting cassandra-driver==2.7.2 (from -r backend-freeze.txt (line 1))
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4d7faf94a8>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/cassandra-driver/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4d7faf9588>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/cassandra-driver/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4d7faf9668>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/cassandra-driver/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f4d7faf9748>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/cassandra-driver/

Not sure what's going on here. I'm not using a proxy (which seems to be the case for others who have stated their experience with similar/same error).


回答1:


So, I discovered the issue. I'm not sure how this happened, but someone put a DROP all anywhere/anywhere iptables line in the INPUT chain.

I promise it wasn't me, but removing that line definitely resolved the issue. Now to figure out which employee thought that'd be a great idea.



来源:https://stackoverflow.com/questions/34038946/pip-in-virtualenv-gets-connecttimeouterror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!