1.安装3.7
添加源
sudo add-apt-repository ppa:deadsnakes/ppa
检查更新
sudo apt-get update
安装python3.7
sudo apt-get install python3.7
2.使用 update-alternatives 来为整个系统更改Python 版本
查看python替代版本信息
~$ update-alternatives --display python
但是结果为
update-alternatives: error: no alternatives for python
python的替代版本尚未被update-alternatives
查看python的位置
更新一下替代列表
查看python替代版本信息
切换版本
安装pip
sudo apt install python3-pip
参考资源:https://www.cnblogs.com/baby123/p/14234171.html