pip安装netifaces报错

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\

阅读 13.1k
2 个回答

你这就是单纯的timeout:

  1. 重试

  2. 用 --proxy 代理

  3. 按楼上所写的使用国内的镜像

新手上路,请多包涵
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题