当前位置:网站首页>python 下载模块加速实现记录
python 下载模块加速实现记录
2020-11-06 01:22:00 【IT界的小小小学生】
加速pip下载:更换pip源
pip下载python包时默认使用国外源,下载比较慢,可以考虑替换为国内源。
临时修改源
清华源
清华大学的pip源,它是官网pypi的镜像,每隔5分钟同步一次,推荐使用。
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple
–trusted-host pypi.tuna.tsinghua.edu.cn packagename
豆瓣源
pip install -i http://pypi.douban.com/simple
–trusted-host pypi.douban.com packagename
阿里源
pip install -i http://mirrors.aliyun.com/pypi/simple
–trusted-host mirrors.aliyun.com/pypi/simple/ packagename
永久修改
修改~/.pip/pip.conf文件,如果没有就创建一个,写入如下内容(以清华源为例):
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn
下载whl文件去安装
https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxmlpip
install cvxpy-xxx.whl
版权声明
本文为[IT界的小小小学生]所创,转载请带上原文链接,感谢
https://vip01.blog.csdn.net/article/details/101426554
边栏推荐
猜你喜欢
随机推荐
PPT画成这样,述职答辩还能过吗?
使用 Iceberg on Kubernetes 打造新一代云原生数据湖
Troubleshooting and summary of JVM Metaspace memory overflow
文本去重的技术方案讨论(一)
如何将数据变成资产?吸引数据科学家
Cocos Creator 原始碼解讀:引擎啟動與主迴圈
GDB除錯基礎使用方法
DTU连接经常遇到的问题有哪些
连肝三个通宵,JVM77道高频面试题详细分析,就这?
Anomaly detection method based on SVM
深度揭祕垃圾回收底層,這次讓你徹底弄懂她
数字城市响应相关国家政策大力发展数字孪生平台的建设
(1)ASP.NET Core3.1 Ocelot介紹
网络安全工程师演示:原来***是这样获取你的计算机管理员权限的!【维持】
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
Pattern matching: The gestalt approach一种序列的文本相似度方法
【QT】 QThread部分原始碼淺析
Polkadot series (2) -- detailed explanation of mixed consensus
How to get started with new HTML5 (2)
“颜值经济”的野望:华熙生物净利率六连降,收购案遭上交所问询








