从 18.1 升级到 ubuntu 19.04,终端无法打开,python 问题

从 18.1 升级到 ubuntu 19.04,终端无法打开,python 问题

我最近尝试从 ubuntu 18.10 更新到 ubuntu 19.04,更新完成但出现错误。我已移除 nvidia 显卡,并尝试修复安装但无济于事。我无法打开终端,我认为主要问题是由于 python 问题。我可以访问 tty,并尝试重新安装 python 包,但这似乎不起作用。我收到错误消息,例如没有名为“lsb_release”、“distro_info”、“apt_pkg”等的模块。我尝试了以下命令,但它们现在执行时没有错误消息;

dpkg --configure -a
apt-get upgrade
apt-get update
apt-get -f install
apt-get -m install
apt-get dist-upgrade
apt-get install --reinstall ubuntu-desktop
apt-get autoremove
apt-get clean

我不太清楚到底是什么问题,但是例如我尝试添加图形驱动程序存储库;

sudo add-apt-repository ppa:graphics-drivers/ppa
File "usr/bin/add-apt-repository"......
No module named 'softwareproperties'

如果我打开 python3.5,lsb_release、softwareproperties、distro_info 都可以正常导入,但是在 python3.7(python3 的系统默认设置)中却不存在。

如果我在文件中并右键单击以打开终端,则终端将打开,但如果我从桌面或 ctrl-alt-t 选择它,则不会打开。

运行 whereis python 返回;

python: /usr/bin/python3.7m /usr/bin/python3.5 /usr/bin/python /usr/bin/python3.7m-config /usr/bin/python3.5m /usr/bin/python2.7 /usr/bin/python3.7 /usr/bin/python2.7-config /usr/bin/python3.7-config /usr/lib/python3.5 /usr/lib/python3.6 /usr/lib/python2.7 /usr/lib/python3.8 /usr/lib/python3.7 /etc/python3.5 /etc/python /etc/python3.6 /etc/python2.7 /etc/python3.7 /usr/local/lib/python3.5 /usr/local/lib/python3.6 /usr/local/lib/python2.7 /usr/local/lib/python3.7 /usr/include/python3.7m /usr/include/python2.7 /usr/include/python3.7 /usr/share/python /home/mark/anaconda3/bin/python3.7m /home/mark/anaconda3/bin/python /home/mark/anaconda3/bin/python3.7m-config /home/mark/anaconda3/bin/python3.7 /home/mark/anaconda3/bin/python3.7-config /usr/share/man/man1/python.1.gz

相关内容