2012-09-23 122 views
0
(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?爲什麼我沒有安裝django,我應該運行pip安裝多次嗎?

回答

0

安裝在下載階段失敗。您應回答以下問題:

  1. 您是否連接到互聯網?
  2. 您使用互聯網連接代理嗎?如果你這樣做,添加一個環境變量http_proxy=http://user:[email protected]:port/
+1

他下載了491KB/7.7MB所以它不是代理問題 – jterrace