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 要安裝的模塊

這樣就可以安裝成功

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM