python?pip安裝庫下載源更換(清華源、阿里源、中科大源、豆瓣源)
更新時間:2024年10月17日 09:39:35 作者:一晌小貪歡
為了提高Python包的下載速度和穩(wěn)定性,可以配置國內的鏡像源,如清華源、阿里源、中科大源和豆瓣源,設置方法簡單,只需更改pip的配置文件或使用命令行即可,需要的朋友可以參考下
使用全局配置,建議使用豆瓣
如阿里
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需要設置為環(huán)境變量里
如,按下 win+r,出入cmd,繼續(xù)輸入pip,能夠正常彈出如下圖
總結
到此這篇關于python pip安裝庫下載源更換的文章就介紹到這了,更多相關python pip下載源更換內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
Pandas中Series和DataFrame的索引實現(xiàn)
這篇文章主要介紹了Pandas中Series和DataFrame的索引實現(xiàn),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2019-06-06