Python必备——Pip永久换源

 pip 永久换源

1、cmd 命令窗口下,根据想要的源,运行代码

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

阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

腾讯源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple

豆瓣源
pip config set global.index-url http://pypi.douban.com/simple/

换回默认源
pip config unset global.index-url

运行结果:

2、查看配置是否成功,cmd窗口,运行下面代码:

pip config list

出现下面结果表示成功 

Python必备——Pip永久换源_第1张图片 

你可能感兴趣的:(python,pip,开发语言)