pip配置华为加速
临时使用:
pip install --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple 安装的包名
或者
pip install -i https://repo.huaweicloud.com/simple/sqlalchemy
永久使用:
Window
完整地址:C:\Users%UserName%\pip\pip.ini
Ctrl + R 进入运行,地址栏输入:C:\Users%UserName%,然后创建pip文件夹,然后创建pip.ini文件
内容:
[global]
index-url = https://repo.huaweicloud.com/repository/pypi/simple
trusted-host = repo.huaweicloud.com
timeout = 120
Linux
mkdir -p ~/.pip/
cat <
[global]
index-url = https://repo.huaweicloud.com/repository/pypi/simple
trusted-host = repo.huaweicloud.com
timeout = 120
EOF