无论我使用 PIP 还是手动下载并在 Pyramid 上运行“python setup.py install”,我都会遇到相同的错误:访问标准 pypi 网站。
如果我在浏览器中访问网站,则一切正常,但如果我运行命令,则一切正常。错误如下。
我猜大多数使用这些 url 的包都会出现该错误,因为我位于代理后面,而我的代理不允许通过 python 可执行文件进行 Web 访问?
假设这是问题所在,如何指定 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')
最佳答案
抱歉,我应该进一步搜索: Plone: pypi specific download issue behind a proxy server - can't install eggs
我创建了两个环境变量:HTTP_PROXY 和 HTTPS_PROXY
注意上面关于 --proxy 参数的评论也可以通过 pip 工作。
关于python - pypi 无法安装在代理后面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23980593/