新建.pip路径
mkdir ~/.pip
新建pip.conf配置文件
sudo vim ~/.pip/pip.conf
vim操作指令:
i:在光标前插入
按 [ESC] 键退出插入模式
:wq:保存文件并退出
各种镜像源
# 豆瓣源 [global] timeout = 6000 index-url = http://pypi.douban.com/simple trusted-host = pypi.douban.com # 清华源 [global] timeout = 6000 index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = pypi.tuna.tsinghua.edu.cn # 阿里云 [global] timeout = 6000 index-url = https://mirrors.aliyun.com/pypi/simple/ trusted-host = mirrors.aliyun.com
若没有安装sudo,则
apt-get update apt-get install sudo



