解决pip安装时速度慢的问题 镜像源(pip install -i [镜像源地址] [包名])
生活随笔
收集整理的這篇文章主要介紹了
解决pip安装时速度慢的问题 镜像源(pip install -i [镜像源地址] [包名])
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
更改pip源即可,修改為pip國(guó)內(nèi)源:
新版ubuntu要求使用https源,要注意。
清華:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中國(guó)科技大學(xué) https://pypi.mirrors.ustc.edu.cn/simple/ 華中理工大學(xué):http://pypi.hustunique.com/ 山東理工大學(xué):http://pypi.sdutlinux.org/ 豆瓣:http://pypi.douban.com/simple/臨時(shí)使用:
可以在使用pip的時(shí)候加參數(shù)-i https://pypi.tuna.tsinghua.edu.cn/simple
例如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gevent,這樣就會(huì)從清華這邊的鏡像去安裝gevent庫(kù)。
比如,我使用清華鏡像源安裝sklearn,賊快,賊猛!!!!
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple sklearn C:\Users\HuaWei>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple sklearn Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting sklearnDownloading https://pypi.tuna.tsinghua.edu.cn/packages/1e/7a/dbb3be0ce9bd5c8b7e3d87328e79063f8b263b2b1bfa4774cb1147bfcd3f/sklearn-0.0.tar.gz Collecting scikit-learnDownloading https://pypi.tuna.tsinghua.edu.cn/packages/21/d9/7da9d5afdf901ab069226853c84a432c5db80fd616849ebcee29fd8a04e0/scikit_learn-0.22.1-cp36-cp36m-win_amd64.whl (6.3MB)|████████████████████████████████| 6.3MB 6.8MB/s Collecting joblib>=0.11Downloading https://pypi.tuna.tsinghua.edu.cn/packages/28/5c/cf6a2b65a321c4a209efcdf64c2689efae2cb62661f8f6f4bb28547cf1bf/joblib-0.14.1-py2.py3-none-any.whl (294kB)|████████████████████████████████| 296kB 6.8MB/s Requirement already satisfied: scipy>=0.17.0 in d:\yolov3_tensorflow\python\lib\site-packages (from scikit-learn->sklearn) (1.1.0) Requirement already satisfied: numpy>=1.11.0 in d:\yolov3_tensorflow\python\lib\site-packages (from scikit-learn->sklearn) (1.15.1) Building wheels for collected packages: sklearnBuilding wheel for sklearn (setup.py) ... doneCreated wheel for sklearn: filename=sklearn-0.0-py2.py3-none-any.whl size=1321 sha256=97f825459ab15505b1fd6cab5ff19adf5acc286a367aa80f93cdfed5f4274e42Stored in directory: C:\Users\HuaWei\AppData\Local\pip\Cache\wheels\6f\cd\11\f6acd1062135d70bc0a7066808561580d256b3149055cb33ad Successfully built sklearn Installing collected packages: joblib, scikit-learn, sklearn Successfully installed joblib-0.14.1 scikit-learn-0.22.1 sklearn-0.0 WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.C:\Users\HuaWei>參考文章:解決pip install慢的方法
總結(jié)
以上是生活随笔為你收集整理的解决pip安装时速度慢的问题 镜像源(pip install -i [镜像源地址] [包名])的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: PyTorch 《动手学深度学习》学习笔
- 下一篇: 绘制不同光照条件下识别率多项式拟合曲线图