ubuntu python挂在pip 修改代理源
-
下载python
sudo apt install python
-
更换软链接
sudo rm /usr/bin/python sudo ln -s /usr/bin/python3.6 /usr/bin/python
-
python挂载pip
sudo apt install python3-pip sudo pip3 install --upgrade pip
-
更换pip源:创建一个文件夹及文件
mkdir -p ~/.pip touch ~/.pip/pip.conf gedit ~/.pip/pip.conf
-
更换pip源:编辑内容如下
[global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host = mirrors.aliyun.com