【发布时间】:2014-06-01 13:53:48
【问题描述】:
无论我使用 PIP 还是手动下载并在 Pyramid 上运行“python setup.py install”,我都会遇到同样的错误:访问标准 pypi 网站。
如果我在浏览器中访问这些站点,一切正常,但如果我运行命令,它就不行。错误如下。
我猜大多数使用这些 url 的包都会出现错误,因为我在代理后面,并且我的代理不允许通过 python 可执行文件访问网络?
假设这是问题所在,我如何指定 pip 或只是应用程序 setup.py 来使用我的代理。
Installed c:\pymon\python34\lib\site-packages\pyramid-1.5.1-py3.4.egg
Processing dependencies for pyramid==1.5.1
Searching for PasteDeploy>=1.5.0
Reading https://pypi.python.org/simple/PasteDeploy/
Download error on https://pypi.python.org/simple/PasteDeploy/: timed out -- Some
packages may not be found!
Couldn't find index page for 'PasteDeploy' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: timed out -- Some packages may not be found!
No local packages or download links found for PasteDeploy>=1.5.0
error: Could not find suitable distribution for Requirement.parse('PasteDeploy>=
1.5.0')
【问题讨论】:
-
可以为pip指定代理参数。
pip install package --proxy=http://username:password@server:port -
谢谢,请看下面我的回答