臨時使用
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
原文鏈接:https://blog.csdn.net/lusing/article/details/104437843