为什么我没有安装django,我应该运行pip install多次?

时间:2012-09-23 15:03:53

标签: python django python-2.7 pip

(py) D:\python>pip install django
Downloading/unpacking django
  Downloading Django-1.4.1.tar.gz (7.7MB): 491kB downloaded
Exception:
Traceback (most recent call last):
  File "D:\python\py\lib\site-packages\pip-1.2.1-py2.7.egg\pip\basecommand.py",
line 107, in main
    status = self.run(options, args)
  File "D:\python\py\lib\site-packages\pip-1.2.1-py2.7.egg\pip\commands\install.
py", line 256, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
  File "D:\python\py\lib\site-packages\pip-1.2.1-py2.7.egg\pip\req.py", line 101
8, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "D:\python\py\lib\site-packages\pip-1.2.1-py2.7.egg\pip\req.py", line 114
2, in unpack_url
    retval = unpack_http_url(link, location, self.download_cache, self.download_
dir)
  File "D:\python\py\lib\site-packages\pip-1.2.1-py2.7.egg\pip\download.py", lin
e 463, in unpack_http_url
    download_hash = _download_url(resp, link, temp_location)
  File "D:\python\py\lib\site-packages\pip-1.2.1-py2.7.egg\pip\download.py", lin
e 380, in _download_url
    chunk = resp.read(4096)
  File "C:\Python27\Lib\socket.py", line 378, in read
    data = self._sock.recv(left)
  File "C:\Python27\Lib\httplib.py", line 552, in read
    s = self.fp.read(amt)
  File "C:\Python27\Lib\socket.py", line 378, in read
    data = self._sock.recv(left)
timeout: timed out

Storing complete log in C:\Users\bigmeow\pip\pip.log

下载时,pip存储Django-1.4.1.tar.gz在哪里?

1 个答案:

答案 0 :(得分:0)

下载阶段的安装失败。您应该回答以下问题:

  1. 您是否已连接到互联网?
  2. 您是否使用代理进行互联网连接?如果您这样做,请添加环境变量http_proxy=http://user:pass@my.site:port/