Python使用国内镜像

注意清华源更快一些:

https://pypi.tuna.tsinghua.edu.cn/simple

临时使用
pip install -i https://mirrors.aliyun.com/pypi/simple/ 包名

以后都使用阿里云的源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/


查看设置的结果
pip config list


取消设置
pip config unset global.index-url

也可以修改或创建~/.config/pip/pip.conf

[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

原文链接:https://blog.csdn.net/lusing/article/details/104437843

posted @ 2021-12-18 11:11  蘭亭客  阅读(672)  评论(0编辑  收藏  举报