我曾经试图在我的工作场所搭建Python开发环境来创建一些基本应用程序。例如,我键入pip install numpy
,但似乎无法使pip正常工作,我收到以下错误消息:
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x035884B0>, 'Connection to pypi.python.
org timed out. (connect timeout=15)')': /simple/numpy/
我所做的研究似乎表明代理意识是我的问题,如果是这样的话,我不太确定这到底意味着什么或该如何解决。
export http_proxy=http://proxy.example.com
,则可以使用命令pip install --proxy=$http_proxy numpy
安装numpy。 - prayagupahttp:
开头而不是https:
。否则,您会收到类似于WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1059: The handshake operation timed out'))'
的警告,并且您的软件包安装最终将失败。 - snark