在使用者檔案夾下建立.pip檔案夾及pip.conf檔案,寫入
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
有多個pip的需要修改對應pip名稱
寫入檔案後可輸入以下指令檢視是否寫入成功
more ~/.pip3/pip3.conf
成功後下載下傳包會提示
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
國内鏡像彙總:
http://pypi.douban.com/ 豆瓣
http://pypi.hustunique.com/ 華中理工大學
http://pypi.sdutlinux.org/ 山東理工大學
http://pypi.mirrors.ustc.edu.cn/ 中國科學技術大學
http://mirrors.aliyun.com/pypi/simple/ 阿裡雲
https://pypi.tuna.tsinghua.edu.cn/simple/ 清華大學
windows下同理