2解压文件
tar xvJf Python-3.7.1.tar.xz
sudo apt install build-essential zlib1g-dev libbz2-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
3.进入目录 配置安装目录
./configure --prefix=/usr/bin/python3.7
4编译和安装
sudo make&&sudo make install
5.设置python3.7.1版本为默认版本;
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3.7/bin/python3.7 /usr/bin/python
6检查安装的版本;