ubuntu16.4安装python3.6以上版本
方式一: 从源代码安装
1:下载 Python 3.6 源代码
wget https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tgz
2:解压源代码:
tar -zxvf Python-3.6.15.tgz
3:进入解压后的目录:
cd Python-3.6.15
4:配置安装:
./configure
5:编译和安装:
make
sudo make install
6:创建软链接的方式将python3命令指向特定版本的 Python
sudo rm /usr/bin/python3
sudo ln -s /usr/bin/python3.6 /usr/bin/python3