python 使用pip下载出现超时,可以配置国内第三方库

豆瓣

阿里云

清华大学

中国科技大学

临时修改

pip install pandas -i https://mirrors.aliyun.com/pypi/simple      (我用了这个命令就可以了)

设为默认
先升级 pip 到最新的版本 (>=10.0.0) 后进行配置:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U   #临时升级
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

命令会在C:\Users\xxx\AppData\Roaming\pip 中创建一个文件
pip.ini

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




链接:https://www.jianshu.com/p/59cdf047f19b

posted @ 2021-04-12 10:33  凯宾斯基  阅读(105)  评论(0)    收藏  举报