Plone:代理服务器背后的pypi特定下载问题-无法安装鸡蛋 [英] Plone: pypi specific download issue behind a proxy server - can't install eggs

查看:158
本文介绍了Plone:代理服务器背后的pypi特定下载问题-无法安装鸡蛋的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里有一个奇怪的问题.

Have a weird problem here.

我所在的网络使用经过身份验证的代理连接到外界.我不控制此代理服务器.

I am in a network that uses an authenticated proxy to connect to the outside world. I do not control this proxy server.

过去,使用wget,curl等使这一事实震惊了我(这在Mac OSX 10.8上是这样).因此,我设置了环境变量:

This fact has in the past tripped me up with use of wget, curl, etc. (this is on Mac OSX 10.8). So, I set the environment variables:

HTTP_PROXY=proxyserveraddress:3128
FTP_PROXY=proxyserveraddress:3128
RSYNC_PROXY=proxyserveraddress:3128

这添加到bash rc(是否是配置文件?)文件时,使网络连接对Shell透明.还有一个指向相同方式的系统代理设置.

This when added to the bash rc (is it profile?) file, has made the network connections transparent to the shell. There is also a system proxy setting that points the same way.

现在,我安装了Plone,并希望将plone.app.ldap鸡蛋安装到安装中.

Now, I installed Plone and wanted to plone.app.ldap egg to the installation.

我在更新buildout.cfg(包括这个鸡蛋)后运行了bin/buildout,我得到了:

I ran bin/buildout after updating buildout.cfg (to include this egg), and I get:

Installing instance.
Download error on http://pypi.python.org/simple/plone.app.ldap/: [Errno 61] Connection     refused -- Some packages may not be found!
Download error on http://pypi.python.org/simple/plone.app.ldap/: [Errno 61] Connection refused -- Some packages may not be found!
Couldn't find index page for 'plone.app.ldap' (maybe misspelled?)
Download error on http://pypi.python.org/simple/: [Errno 61] Connection refused -- Some  packages may not be found!
Getting distribution for 'plone.app.ldap'.
While:
  Installing instance.
  Getting distribution for 'plone.app.ldap'.
Error: Couldn't find a distribution for 'plone.app.ldap'.
*************** PICKED VERSIONS ****************
[versions]

*************** /PICKED VERSIONS ***************


接下来,我编辑了bin/buildout并添加了以下几行:


Next, I edited bin/buildout and added the following lines:

import os

print os.environ["HTTP_PROXY"]

我再次运行bin/buildout.

I ran bin/buildout again.

果然,它吐出来了

proxyserveraddress:3128

这意味着python正在读取环境变量.

That means that python is reading in environment variables.

我又走了一步(这很有趣),并取消了代理设置(只是看它是否重要):

I went a step further (and this where it gets interesting) and unset the proxy setting (just to see if it would matter):

MacBook-Pro:zinstance macpro$export HTTP_PROXY=
MacBook-Pro:zinstance macpro$ bin/buildout 


Installing instance.
Download error on http://dist.plone.org: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://download.zope.org/ppix/: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://download.zope.org/distribution/: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://effbot.org/downloads: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://dist.plone.org/release/4.3.2: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://pypi.python.org/simple/plone.app.ldap/: [Errno 61] Connection refused -- Some packages may not be found!
Download error on http://pypi.python.org/simple/plone.app.ldap/: [Errno 61] Connection refused -- Some packages may not be found!
Couldn't find index page for 'plone.app.ldap' (maybe misspelled?)
Download error on http://pypi.python.org/simple/: [Errno 61] Connection refused -- Some packages may not be found!
Getting distribution for 'plone.app.ldap'.
While:
  Installing instance.
  Getting distribution for 'plone.app.ldap'.
Error: Couldn't find a distribution for 'plone.app.ldap'.
*************** PICKED VERSIONS ****************
[versions]

*************** /PICKED VERSIONS ***************


因此,您取消设置代理,其他服务器(克隆,zope,effbot)开始抱怨.这意味着我的代理服务器设置对于这些下载而言工作正常,但是以某种上帝,我希望,为什么,对于pypi.python.org来说,它们还不够好.


So, you unset the proxy and other servers (plone, zope, effbot) start complaining. That means that my proxy settings were working fine for those downloads but in some God-I-wish-knew-why way, they are not good enough for pypi.python.org.

pypi.python.org有何特别之处?它是否使用一些特殊的端口进行连接(与通过构建方式联系的其他服务器不同),而该端口可能会被网络代理服务器关闭?在任何人问之前,是的,我可以使用Chrome浏览器浏览到pypi.python.org URL.

What is so special about pypi.python.org? Does it use some special port for connecting (unlike the other servers contacted by buildout) that may be shut off by the network proxy server?? Before anyone asks, yes, I can browse to the pypi.python.org URL fine using Chrome browser.

我已经确定我有一个合理的代理设置.它的pypi搞砸了扩展.

I have established that I have a sensible proxy setting. Its pypi that is messing up buildout.

推荐答案

pypi使用的安全套接字身份验证有可能引起您的问题,因为它可能使用了代理转发列表中未包含的其他端口.您可能可以通过与其他Poxy设置相同的方式来解决此问题.

It is possible that the secured socket authentication used by pypi is causing your problems as it probably uses a different port that you are not including in your proxy forwarding list. You may be able to resolve this in the same manner as your other poxy settings.

另一种方法是在运行构建之前从pypi手动下载并安装所需的软件包-如果已经满足依赖关系,则将不使用访问权限.

Another way round would be to manually download and install the required packages from pypi before running the build - if the dependencies are already satisfied they the access will not be used.

您还可以考虑运行本地pypi服务器并定向到该服务器-您仍然需要下载到该服务器这些软件包,但是如果您要进行多次安装,那是值得的.

You could also consider running a local pypi server and directing to that - you would still need to download to that server the packages but if you are doing multiple installations it would be worth it.

这篇关于Plone:代理服务器背后的pypi特定下载问题-无法安装鸡蛋的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆