Python國內鏡像源配置,以豆瓣爲例

python安裝包時使用豆瓣鏡像源下載安裝特別快!!!!設置如下:

python_ori -m pip install -U airtest -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

在國內使用 pip 默認源安裝時速度較爲緩慢,可以採用國內的 Python 鏡像源進行安裝。主要的鏡像源如下:
 
臨時使用

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xxxx

注意:是 https 不是 http

 
設爲默認
升級 pip 至最新版本(>= 10.0.0)
執行配置設置
  1. pip install pip -U -i https://pypi.tuna.tsinghua.edu.cn/simple
  2. pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章