開發與維運

Centos7下解決pip下載慢的問題

1.安裝pip
yum install python-pip
yum install python3-pip
image.png

2.查看pip.ini配置文件
find / -name pip.conf
image.png
3.編輯pip.conf配置文件.添加如下內容

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

image.png
4.測試pip下載
image.png
可以看到下載源已修改成功

Leave a Reply

Your email address will not be published. Required fields are marked *