ubuntu升级python3.5到python3.10

wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz
tar -zxvf Python-3.10.0.tgz
cd Python-3.10.0
./configure
./configure --enable-optimizations
make && make install
sudo ln -s /usr/local/bin/python3.10 /usr/bin/python3.10
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150

你可能感兴趣的:(ubutu,ubuntu,python)