因为开发需要,有时需要在配置pip安装时使用国内源来加速,下面以配置华中科大pip源为例进行说明
修改pip配置文件,linux的在~/.pip/pip.conf,没有的话可以自行创建
内容如下:
[global]
index-url = http://pypi.mirrors.ustc.edu.cn/simple/
trusted-host = pypi.mirrors.ustc.edu.cn
disable-pip-version-check = true ---防止每次运行pip命令都提示更新最新版pip