1
我剛剛在Windows 7上安裝了Python,如 http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/install.html中所述。 在步驟3的Im,當我運行python ez_setup.py命令時出現以下錯誤。 我去ez_setup.py從這個URL http://peak.telecommunity.com/dist/ez_setup.pyPython ex_setup.py urlopen錯誤[Errno 11004] getaddrinfo失敗
c:\Python27>python ez_setup.py
Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-p
y2.7.egg
Traceback (most recent call last):
File "ez_setup.py", line 278, in <module>
main(sys.argv[1:])
File "ez_setup.py", line 210, in main
egg = download_setuptools(version, delay=0)
File "ez_setup.py", line 158, in download_setuptools
src = urllib2.urlopen(url)
File "c:\Python27\lib\urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "c:\Python27\lib\urllib2.py", line 400, in open
response = self._open(req, data)
File "c:\Python27\lib\urllib2.py", line 418, in _open
'_open', req)
File "c:\Python27\lib\urllib2.py", line 378, in _call_chain
result = func(*args)
File "c:\Python27\lib\urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "c:\Python27\lib\urllib2.py", line 1177, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 11004] getaddrinfo failed>
c:\Python27>
我發現問題解決問題。 這是由於可以使用以下命令修復的網絡代理。 'set http_proxy = user:password @ proxyaddress:port'。 我希望這可以幫助某人 – 2014-09-18 18:45:59