更换pip源

更换pip源

原来配置的源是pypi.douban.com ,提示存在风险:

WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.

查看当前配置源 pip config list

C:\Users\Test>  pip config list
global.index-url='http://pypi.douban.com/simple'
install.trusted-host='pypi.douban.com'

更换到清华源

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

C:\Users\Test>pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Writing to C:\Users\Test\AppData\Roaming\pip\pip.ini

检查配置: pip config list


C:\Users\Test>  pip config list
global.index-url='https://pypi.tuna.tsinghua.edu.cn/simple'
install.trusted-host='pypi.douban.com'

你可能感兴趣的:(Python,Windows,pip,linux,运维)