从需求文件中的Pip安装失败,但逐个安装工作

时间:2014-06-20 22:27:42

标签: python pip packages

我正在尝试使用requirements.txt文件使用以下命令安装一堆python依赖项:

pip install -r requirements.txt

requirements.txt文件包含以下包:

pep8
selenium
paramiko
soappy
nose
wmi
mock
python-keystoneclient
python-novaclient
python-cinderclient
python-swiftclient
python-glanceclient
python-heatclient
python-neutronclient

但是当运行pip install命令时,我收到此错误:

Downloading/unpacking PrettyTable>=0.7,<0.8 (from python-keystoneclient->-r requ
irements.txt (line 9))
Cleaning up...
Exception:
Traceback (most recent call last):
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\basecommand.py", line
 122, in main
    status = self.run(options, args)
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\commands\install.py",
 line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\req.py", line 1197, i
n prepare_files
    do_download,
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\req.py", line 1375, i
n unpack_url
    self.session,
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\download.py", line 54
6, in unpack_http_url
    resp = session.get(target_url, stream=True)
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\_vendor\requests\sess
ions.py", line 395, in get
    return self.request('GET', url, **kwargs)
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\download.py", line 23
7, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\_vendor\requests\sess
ions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\_vendor\requests\sess
ions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "C:\Python27\VirtualEnvs\test\lib\site-packages\pip\_vendor\requests\adap
ters.py", line 381, in send
    raise ProxyError(e)
ProxyError: Cannot connect to proxy. Socket error: [Errno 10054] An existing con
nection was forcibly closed by the remote host.

Storing debug log for failure in C:\Users\cjmarti2\pip\pip.log

但由于某些原因,如果我使用pip install <package>安装所有软件包,它们都会正确安装。

要考虑的几件事情; 1)因为我在我公司的内联网中,所以我使用set https_proxy=https://company-proxy.com:port设置代理。 2)在Linux机器上使用requirements.txt安装完全相同的软件包可以正常工作。有什么想法吗?

更新 我使用Python 2.7进行64位。我卸载它并安装了32位,我不再遇到这个问题。看起来python版本是问题,64位因某种原因导致问题。

0 个答案:

没有答案