更改源
使用清华大学镜像
临时使用
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple package-names默认使用
修改配置文件(如果没有则新建)
Linux:~/.config/pip/pip.confWindows:%APPDATA%\pip\pip.iniMacOS:$HOME/Library/Application Support/pip/pip.confLinux中,pip和pip3共存时:~/.pip/pip.conf
修改
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple
最后更新于
这有帮助吗?