Linux安装Python3

#卸载已有python3
sudo apt remove python3 

# 下载源码并安装
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
tar xvf Python-3.8.1.tgz
cd Python-3.8.1.tgz
sudo ./configure --enable-optimizations
sudo make altinstall
python3.8 -V

相关推荐