(转)如何加快pip下载的速度
pip 之所以慢,是因为它默认使用的国外的统一的下载源,所以要想加快pip的下载速度,可行的办法就是切换下载源为国内,国内一些大公司也提供了对应的竞相网站。
国内镜像网站
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
使用方法
pip install [包名] -i [ftp站名地址] --trusted-host [ftp站点名]
以安装numpy为例,如果使用 阿里的源可以这样输入命令
pip install numpy -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
如果使用 豆瓣的源可以这样输入命令
pip install numpy -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
如果想一劳永逸或许可以这样
alias pyinstall='pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com '
将这个alias 放到 /etc/bash.bashrc 或者~/.bashrc中 以后调用pyinstall 时就可以不再加后面的参数,而且也省了 install 这个单词。
转自:https://blog.csdn.net/qq_38282836/article/details/86603480
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
2019-03-29 Phonics 自然拼读法 s,a,t,i,p,n Teacher:Lamb
2019-03-29 English Voice of <<City of stars>>