系统更换pip源
Linux:
设置更换清华源 永久
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.trusted-host https://pypi.tuna.tsinghua.edu.cn
临时使用清华源
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
如果报错,先更新pip
pip install --upgrade pip
Windows:
user目录下新建pip/pip.ini
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
找不到python或者pip位置时,指定python pip安装
python -m pip install