問題描述:
在pip install安裝代碼庫的時候,提示超時,報錯信息如下。
Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/24/bd/adb580d907a71d1082b3eaa47790f199f6e73eb198353adac48b035d00ff/characters-0.1.0.tar.gz (Caused by ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x104cae828>, 'Connection to files.pythonhosted.org timed out. (connect timeout=15)'))
解決辦法:
在install 命令行後面指定下載源,如 pip install bs4 -i https://pypi.doubanio.com/simple
引用: