一、安装python3.6
sudo add-apt-repository ppa:jonathonf/python-3.6
如显示不能添加"‘ppa:~jonathonf/ubuntu/python-3.6‘",则输入
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
调整python3的优先级,使得python3.6的最高
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
更改默认值,python默认为Python2,现在修改为Python3
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
二、no module named pip
sudo apt-get install python3-pip
wget http://bootstrap.pypa.io/get-pip.py
sudo python3.8 get-pip.py
三、You are using pip version 8.1.1, however version 21.2.1 is available.You should consider upgrading via the 'pip install --upgrade pip' command.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py --force-reinstall