【问题标题】:pypi cannot install behind proxypypi 无法安装在代理后面
【发布时间】: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
  • 谢谢,请看下面我的回答

标签: python pip pyramid pypi


【解决方案1】:

抱歉,我应该进一步搜索: Plone: pypi specific download issue behind a proxy server - can't install eggs

我创建了两个环境变量:HTTP_PROXY 和 HTTPS_PROXY

请注意上述关于 --proxy 参数的评论也通过 pip 起作用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-29
    • 1970-01-01
    • 2015-01-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多