1. 程式人生 > >設定阿里雲pip源,加速pip更新速度

設定阿里雲pip源,加速pip更新速度

Linux系統:

建立資料夾

mkdir  ~/.pip

寫入內容

cat > ~/.pip/pip.conf << EOF
[global]
trusted-host=mirrors.aliyun.com
index-url=https://mirrors.aliyun.com/pypi/simple/
EOF

Windows系統:

首先在window的資料夾視窗輸入 : %APPDATA%

然後建立pip資料夾

最後建立pip.ini檔案,寫入如下內容

[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com