pip安装和下载第三方库


pip默认下载第三方库的网站是Python官方模块库:https://pypi.python.org。但有时网速比较慢,我们可以更换国内的镜像源。

  1. 新版ubuntu要求使用https源,要注意。

  2. 清华:https://pypi.tuna.tsinghua.edu.cn/simple

  3. 阿里云:http://mirrors.aliyun.com/pypi/simple/

  4. 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

  5. 华中理工大学:http://pypi.hustunique.com/

  6. 山东理工大学:http://pypi.sdutlinux.org/

  7. 豆瓣:http://pypi.douban.com/simple/

一、临时更改下载源

  1、安装:pip install 库名 -i https://pypi.tuna.tsinghua.edu.cn/simple

  2、下载:pip download 库名 -i 镜像源

二、永久更改下载源

  1、pip config set global.index-url='https://pypi.tuna.tsinghua.edu.cn/simple'


免责声明!

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



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