pip install不会安装在我的机器上

时间:2013-12-30 15:23:08

标签: python django python-2.7 pip

所以,我正在尝试将我的Django版本升级到1.4.2,但是当我pip install Django==1.4.2 -vvv时,我得到了:

Will skip URL http://awdb.pypi.python.org/simple/Django/ when looking for download links for Django==1.4.2
  Getting page http://jlxn.pypi.python.org/simple/Django/
  Could not fetch URL http://euea.pypi.python.org/simple/Django/: <urlopen error [Errno -3] Temporary failure in name resolution>
  Will skip URL http://euea.pypi.python.org/simple/Django/ when looking for download links for Django==1.4.2
  Getting page http://krrw.pypi.python.org/simple/Django/
  Could not fetch URL http://hfyu.pypi.python.org/simple/Django/: <urlopen error [Errno -3] Temporary failure in name resolution>
  Will skip URL http://hfyu.pypi.python.org/simple/Django/ when looking for download links for Django==1.4.2
  Getting page http://ixoj.pypi.python.org/simple/Django/

使用--verbose时,我注意到我得到了:

pip install -i --verbose http://d.pypi.python.org/simple Django==1.4.2
Downloading/unpacking http://d.pypi.python.org/simple
  Downloading simple (1.7Mb): 1.7Mb downloaded
  Cannot unpack file /tmp/pip-zgK95n-unpack/simple (downloaded from /tmp/pip-NFrk4r-build, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of /tmp/pip-NFrk4r-build
Storing complete log in /home/administrator/.pip/pip.log
日志中的

信息:

Exception information:
Traceback (most recent call last):
  File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
    status = self.run(options, args)
  File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 245, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 985, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1109, in unpack_url
    retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
  File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/download.py", line 456, in unpack_http_url
    unpack_file(temp_location, location, content_type, link)
  File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/util.py", line 505, in unpack_file
    raise InstallationError('Cannot determine archive format of %s' % location)
InstallationError: Cannot determine archive format of /tmp/pip-NFrk4r-build

任何想法?

1 个答案:

答案 0 :(得分:0)

我能够通过这样做来解决它:

pip install --verbose https://pypi.python.org/packages/source/D/Django/Django-1.4.2.tar.gz#md5=6ffecdc01ad360e1abdca1015ae0893a

问题是我仍然不知道问题的原因