查看pip源和换源

查看pip源和换源,第1张

查看当前pip源

(crawl) E:\coding>pip config list
global.index-url='http://pypi.douban.com/simple'
global.timeout='6000'
global.trusted-host='pypi.douban.com'

更改pip源,在本次例子中更改成清华源

(crawl) E:\coding>pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Writing to C:\Users\admin\AppData\Roaming\pip\pip.ini

再次查看当前pip源,发现已更换成功

(crawl) E:\coding>pip config list
global.index-url='https://pypi.tuna.tsinghua.edu.cn/simple'
global.timeout='6000'
global.trusted-host='pypi.douban.com'

注:
有的需要先对pip进行升级才能更换源

python -m pip install --upgrade pip

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/869320.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-13
下一篇2022-05-13

发表评论

登录后才能评论

评论列表(0条)

    保存