当我在终端上运行命令' sudo pip install scipy'(实际上是任何python包,如numpy,pandas ..)在OS X yosemite上,我收到以下错误。
Collecting scipy
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10c566ed0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scipy/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10c599050>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scipy/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10c599190>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scipy/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10c5992d0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scipy/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10c599410>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/scipy/
Could not find a version that satisfies the requirement scipy (from versions: )
No matching distribution found for scipy
我的&#39; git clone ..&#39;工作得非常好(我安装了家酿)。我在代理后面,我做了别名。
答案 0 :(得分:2)
专门为pip指定代理,
sudo pip --proxy http://user:pass@proxy.server:port install packagename
pip没有使用在OS X终端中设置的http_proxy变量。