JavaFX,Unity3D,Android,IOS等技术教程和生活随笔,仅供记录

http://www.wingmei.cn/wp-content/themes/Vtrois-Kratos-e85a527/images/background.jpg

Mac pip3 install错误 Read timed out

我们在使用Pip的时候,经常会因为访问源的问题而报错:HTTPSConnectionPool(host=’files.pythonhosted.org’, port=443): Read timed out。

其实很简单,我们只需要将源切换成国内源即可。

首先通过以下命令创建配置文件:

mkdir ~/.pip 
vim ~/.pip/pip.conf

然后在配置文件中配置源:

[global]
timeout = 6000
index-url = http://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com

这样就可以发现速度快多了,哈哈。

《Mac pip3 install错误 Read timed out》

点赞

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注