0
点赞
收藏
分享

微信扫一扫

查看pip源和换源

半夜放水 2022-05-02 阅读 120

查看当前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
举报

相关推荐

0 条评论