添加pip源,ubuntu

时间:2024-06-09 07:02:18

(base) pc@pc:~/Desktop$ mkdir ~/.pip
(base) pc@pc:~/Desktop$ touch ~/.pip/pip.conf
(base) pc@pc:~/Desktop$ nano ~/.pip/pip.conf

[global]
trusted-host = pypi.tuna.tsinghua.edu.cn;mirrors.aliyun.com;mirrors.cloud.tencent.com
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
extra-index-url =
 https://mirrors.aliyun.com/pypi/simple/
 https://mirrors.cloud.tencent.com/pypi/simple/