今天在用sudo pip install sunburnt时,出现了如下错误:
Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'socket.gaierror'>: [Errno -5] No address associated with hostname)
Will skip URL https://pypi.python.org/simple/ when looking for download links for sunburnt
Cannot fetch index base URL https://pypi.python.org/simple/
原因:
是因为机器是内网,需设置代理proxy
解决方案:
sudo pip --proxy=http://username:password@proxyURL:portNumber install sunburnt
加上代理即可。