pip 安装pandas报错

遇到的问题

pip install pandas

报错:

C:\Users\yuze>pip install pandas
Collecting pandas
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0500A730>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/57/70/0292ee0aad71fd662f196502da0d608b7fa82fa32d19e412c10b63b4b415/pandas-1.0.4-cp38-cp38-win32.whl
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0500ADA8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/57/70/0292ee0aad71fd662f196502da0d608b7fa82fa32d19e412c10b63b4b415/pandas-1.0.4-cp38-cp38-win32.whl
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0502C460>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/57/70/0292ee0aad71fd662f196502da0d608b7fa82fa32d19e412c10b63b4b415/pandas-1.0.4-cp38-cp38-win32.whl
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0502CB80>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/57/70/0292ee0aad71fd662f196502da0d608b7fa82fa32d19e412c10b63b4b415/pandas-1.0.4-cp38-cp38-win32.whl
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x05050B80>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /packages/57/70/0292ee0aad71fd662f196502da0d608b7fa82fa32d19e412c10b63b4b415/pandas-1.0.4-cp38-cp38-win32.whl
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/57/70/0292ee0aad71fd662f196502da0d608b7fa82fa32d19e412c10b63b4b415/pandas-1.0.4-cp38-cp38-win32.whl (Caused by NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x050B70A0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

解决办法

换一种安装方式:

pip --default-time=100 install pandas

结果

C:\Users\yuze>pip --default-time=100 install pandas
Collecting pandas
  Downloading pandas-1.0.4-cp38-cp38-win32.whl (7.6 MB)
     |████████████████████████████████| 7.6 MB 39 kB/s
Installing collected packages: pandas
Successfully installed pandas-1.0.4

总结

当安装模块装不上时:

使用

pip --default-time=100 install 要安装的模块

这样就可以安装成功

 

posted on 2020-05-31 14:42  yuze2020  阅读(2828)  评论(0编辑  收藏  举报

导航