鍍金池/ 問(wèn)答/Python/ pip安裝netifaces報(bào)錯(cuò)

pip安裝netifaces報(bào)錯(cuò)

E:panda_spider>pip install netifaces
Collecting netifaces
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (rea

  1. timeout=15)",)': /packages/72/01/ba076082628901bca750bf53b322a8ff10c1d757dc29196a8e6082711c9d/netifaces-0.10.6.tar.gz
    Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (rea

  2. timeout=15)",)': /packages/72/01/ba076082628901bca750bf53b322a8ff10c1d757dc29196a8e6082711c9d/netifaces-0.10.6.tar.gz
    Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (rea

  3. timeout=15)",)': /packages/72/01/ba076082628901bca750bf53b322a8ff10c1d757dc29196a8e6082711c9d/netifaces-0.10.6.tar.gz
    Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (rea

  4. timeout=15)",)': /packages/72/01/ba076082628901bca750bf53b322a8ff10c1d757dc29196a8e6082711c9d/netifaces-0.10.6.tar.gz
    Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection
    object at 0x0000000003623828>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /packages/72/01/ba076082628901bca750bf53b322a8ff10c1d757dc29196a8e6082711c9d/netifaces-0.1

0.6.tar.gz
Downloading netifaces-0.10.6.tar.gz
Installing collected packages: netifaces
Running setup.py install for netifaces ... error

Complete output from command c:\users\administrator\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ADMINI~1\\AppData\\Local\\T

EMP_~1\pip-build-5h0df9u7\netifaces\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --r
ecord C:UsersADMINI~1AppDataLocalTEMP_~1pip-1gc0s9qo-recordinstall-record.txt --single-version-externally-managed --compile:

running install
running build
running build_ext
building 'netifaces' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

----------------------------------------

Command "c:usersadministratorappdatalocalprogramspythonpython36python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\ADMINI~1\AppData\Local\TEMP_~1\pip-build-5h0df9
u7\netifaces\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersADMINI~1\
AppDataLocalTEMP_~1pip-1gc0s9qo-recordinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UsersADMINI~1AppDataLocalTEMP_~1pip-build-5h0
df9u7netifaces\

回答
編輯回答
刮刮樂(lè)

pip install netifaces -i http://pypi.douban.com/simple/

2018年4月3日 03:10
編輯回答
澐染

你這就是單純的timeout:

  1. 重試

  2. 用 --proxy 代理

  3. 按樓上所寫的使用國(guó)內(nèi)的鏡像

2018年2月7日 02:25