欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

python使用pip安裝模塊出現(xiàn)ReadTimeoutError: HTTPSConnectionPool的解決方法

 更新時間:2019年10月04日 21:48:21   投稿:mdxy-dxy  
這篇文章主要介紹了python使用pip安裝模塊出現(xiàn)ReadTimeoutError: HTTPSConnectionPool的解決方法,需要的朋友可以參考下

今天使用pip安裝第三庫時,有時會報錯:

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

使用鏡像:pip install xxxx -i https://pypi.douban.com/simple 如下:

pip install virtualenv -i https://pypi.douban.com/simple

這時可以換成國內(nèi)源:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple module_name

pip install -i https://pypi.douban.com/simple module_name

第一個安裝不行就換第二個試試。

其實用anaconda安裝就比較快,不會出現(xiàn)這個問題

conda install module_name

即可

下面是其它網(wǎng)友的補充

一般情況下PIP出現(xiàn)ReadTimeoutError都是因為被GFW給墻了,所以一般遇到這種問題,我們可以選擇國內(nèi)的鏡像來解決問題。

在Windows下:

C:\Users\Administrator\下新建pip文件夾,在創(chuàng)建pip.ini文件,拷貝下面代碼進去,保存。

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

其實就是把python的源換成了清華源,應該能解決問題。

2016.12.4解決辦法

延長等待時間完美解決問題

windows下在cmd中,linux在終端下輸入如下命令:

pip --default-timeout=100 install -U pip

相關(guān)文章

最新評論