0
点赞
收藏
分享

微信扫一扫

卸载python3.10 重新安装3.9

有态度的萌狮子 2022-01-22 阅读 478
ubuntulinux

Uninstall Python 3.10:

To remove the programming language, run command:

sudo apt remove --autoremove python3.10

Install Python 3.9 via Ubuntu PPA:

1.) Open terminal from system application menu, and run command to add the PPA:

sudo add-apt-repository ppa:deadsnakes/ppa

2.) Then refresh system package via command:

sudo apt update

3.) Finally install Python 3.9 via command:

sudo apt install python3.9

Python 3.9已安装并可以使用。要验证它,请键入:

python3.9 --version


3、设置为默认的python3,待修改验证

which python3.9
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1


4/解决安装Python版本出现No module named 'apt_pkg'问题

sudo apt install python3-apt
cd /usr/lib/python3/dist-packages
sudo cp apt_pkg.cpython-38-x86_64-linux-gnu.so apt_pkg.cpython-39-x86_64-linux-gnu.so

完成
 
参考:

ubuntu20.04安装python3.9并设置为默认的python3_chencaw的专栏-CSDN博客

Upgrade Python to latest version (3.10) on Ubuntu Linux 

举报

相关推荐

0 条评论