2016-02-29 107 views
3

當我在OS X yosemite上對終端「sudo pip install scipy」(事實上與任何python軟件包如numpy,pandas ..)運行命令時,出現以下錯誤。在OS X上安裝python庫

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 

我的'git clone ..'工作得很好(我安裝了家釀)。我在代理之後,並且我做了別名。

+0

試過'conda' http://docs.continuum.io/anaconda/install#anaconda-for-os-x-graphical-install ?? – alvas

+0

我沒有嘗試過,沒有conda不能完成嗎? – curio1729

+0

'正在提取軟件包元數據:錯誤:索引文件無效:https://repo.continuum.io/pkgs/pro/noarch/repodata.json.bz2:不支持代理模式'這是使用conda時的錯誤! – curio1729

回答

1

指定代理用於專門畫中畫,

sudo pip --proxy http://user:[email protected]:port install packagename

PIP不用http_proxy變量,在OS X終端設置。