设置默认的退出时间
添加 --default-timeout:自定义timeout时间,一般能解决大部分timeout问题,但是无法提升下载速度。
1
pip -default-timeout=1000 -U networkx
pip --default-timeout=100 install -U pandasql
设置专有下载镜像
在Windows下:C:\Users\Administrator\下新建pip文件夹,在创建pip.ini文件,拷贝下面代码进去,保存。
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple