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