【发布时间】:2021-03-29 05:23:04
【问题描述】:
我做了什么:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.9
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2
python --version
现在我有多个错误,无法启动终结器或更新。当我启动 mate 终端时,我收到此错误:
/usr/bin/screenfetch: /usr/bin/lsb_release : /usr/bin/python3 : mauvais interpréteur: Aucun fichier ou dossier de ce type
当我使用突触实现时,我收到此错误:
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code
正如我在开始时描述的那样,所有这些错误都是从安装 Python 开始的。
【问题讨论】:
-
不建议将
python3“替代”更新为新的python版本。许多系统工具使用它,它们将缺少仅为 Python 的系统版本安装的库。不要乱用系统 Python!
标签: python python-3.x ubuntu-20.04