python 安裝國內鏡像源


  當python 的 包管理器 pip 有時候網絡不好,甚至下載失敗的時候可以換國內的鏡像源來試試,就和 npm設置淘寶源一樣

臨時配置鏡像源 

  pip3 install <package-name> -i https://pypi.tuna.tsinghua.edu.cn/simple

 

  這個是清華源,還有中國科技大學  https://pypi.mirrors.ustc.edu.cn/simple, 以及 豆瓣 http://pypi.douban.com/simple/,

  阿里 https://mirrors.aliyun.com/pypi/simple/

 

全局配置鏡像源

  pip config set global.index-url https://xxxx

 查看鏡像源

  pip config list

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM