pypi在代理后无法安装
无论我使用PIP安装Pyramid,还是手动下载后运行'python setup.py install',我都遇到了同样的错误:无法访问标准的pypi网站。
如果我在浏览器中访问这些网站,一切正常,但如果我在命令行中运行这个命令,就不行了。错误信息如下。
我猜大多数使用这些网址的包都会出现这个问题,因为我在一个代理后面,而我的代理不允许通过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')
1 个回答
2
抱歉,我应该再多搜索一下:
Plone:在代理服务器后面遇到的pypi特定下载问题 - 无法安装egg包
我创建了两个环境变量:HTTP_PROXY和HTTPS_PROXY
注意,上面的评论提到的--proxy参数在使用pip时也有效。