使用全局配置,建議使用豆瓣
如阿里
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
pip config set install.trusted-host mirrors.aliyun.com
如豆瓣
pip config set global.index-url http://pypi.douban.com/simple/
pip config set install.trusted-host pypi.douban.com
一、清華源 https://pypi.tuna.tsinghua.edu.cn/simple/
pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple/
二、阿里源 https://mirrors.aliyun.com/pypi/simple
pip install xxx -i https://mirrors.aliyun.com/pypi/simple
三、中科大源 https://pypi.mirrors.ustc.edu.cn/simple/
pip install xxx -i https://pypi.mirrors.ustc.edu.cn/simple/
四、豆瓣源 http://pypi.douban.com/simple/
pip install xxx -i http://pypi.douban.com/simple/
前提條件:
你的pip需要設(shè)置為環(huán)境變量里
如,按下 win+r,出入cmd,繼續(xù)輸入pip,能夠正常彈出如下圖
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-859345.html
文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-859345.html
到了這里,關(guān)于python pip安裝庫(kù)—下載源更換(清華源、阿里源、中科大源、豆瓣源)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!