一、apt install python 默认安装的是python3.9
二、安装python3.10需要下载源码手动编译安装
sudo apt update && sudo apt upgrade sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz tar -xf Python-3.10.*.tgz cd Python-3.10.*/ ./configure --enable-optimizations make -j 4 sudo make altinstall
三、验证安装
python3.10 --version
四、移除python3.9
apt remove python3.9
五、查照残余文件并清理
whereis python3.9 #找到相关文件路径
rm * 或者 rm * -rf 即可。
标签:python3.10,3.10,sudo,apt,dev,Debian11,安装,python3.9 From: https://www.cnblogs.com/hiwjy/p/17304526.html