Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

出现ReadTimeoutError(self._pool, None, 'Read timed out.') #6

Open
HuangCongQing opened this issue May 18, 2018 · 3 comments
Open

Comments

@HuangCongQing
Copy link
Owner

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

image

@HuangCongQing
Copy link
Owner Author

一般情况下PIP出现ReadTimeoutError都是因为被墙了,所以一般遇到这种问题,有两种方法:

国内镜像

在Windows下:

C:\Users\Administrator\下新建pip文件夹,在创建pip.ini文件,拷贝下面代码进去,保存。

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

其实就是把python的源换成了清华源,应该能解决问题。

延长等待时间

windows下在cmd中,linux在终端下输入如下命令:

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

或者安装某个特定库时:
pip --default-timeout=100 install -U 库名

@HuangCongQing
Copy link
Owner Author

bingo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant