注意,simple 不能少, 是 https 而不是 http
设为默认对应环境下的终端输入
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple或者
~/.config/pip/pip.conf (Linux)
C:Usersxxxxxpippip.ini (Windows 10)
$HOME/Library/Application Support/pip/pip.conf (macOS)
(没有就创建一个)
修改 index-url
[global]index-url = https://pypi.tuna.tsinghua.edu.cn/simplepip 和 pip3 并存时,只需修改 ~/.pip/pip.conf