在 OS X 上安装 python 个库

Installation of python libraries on OS X

当我 运行 终端 '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

我的 'git clone ..' 工作得很好(我安装了 home brew)。我在代理后面,我做了别名。

专门为pip指定代理,

sudo pip --proxy http://user:pass@proxy.server:port install packagename

pip 不使用 http_proxy 变量,在 OS X 终端中设置。