pip安装换成国内的镜像源


背景

pip下载包的时候,国外源下载速度贼慢,尝试换成国内源

国内源有

  1. 阿里云 http://mirrors.aliyun.com/pypi/simple/
  2. 豆瓣(douban) http://pypi.douban.com/simple/
  3. 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
  4. 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

下载命令如下(例如阿里云)

python3 -m pip install tensorflow==1.5.0 -i  http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

 

requirements.txt的使用

pandas==0.25.3
numpy==1.19.4

pip install requirements.txt -i  http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM