ubuntu20 安装python3.7

ubuntu20默认python版本是python3.8。

------------------------------安装python3.7版本---------------
开发需要python3.7
安装方法:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.7

确认:

$ > whereis python

应该key看到python3.7

-------------------------------------------------多版本管理------------------------------------

//python多版本切换

update-alternatives  --list  <NAME>

update-alternatives --install //添加python各个版本   //参数name = python

update-alternatives --set     //设置当前版本

猜你喜欢

转载自blog.csdn.net/yinzhiqing/article/details/121289884