使用國內 pip 源能夠在使用包管理工具 pip 下載第三方包時大大提高其速度,CentOS 8 更換 pip 源具體操作步驟如下:
修改 /etc/pip.conf 文件:
1.執行命令:vi ~/.pip/pip.conf 編輯 pip.conf 配置文件 如果沒有 用find命令找下
find / -name 'pip.conf'
[global]
index-url = https://mirrors.aliyun.com/pypi/simple
[install]
trusted-host = mirrors.aliyun.com
2.按下 i 鍵插入,輸入如下內容,按下 esc,:wq 保存退出
更簡單的辦法
原文鏈接:https://blog.csdn.net/qq_44214671/article/details/117607597