0

I am running 20.04.3 and tried to upgrade my python environment and horked something.

The terminal will not launch. Thankfully, I kept my Mac Book after I switched my main dev work to this new Ubuntu system.

I have tried the workarounds listed, for example, here:

How to solve the error "Failed to launch Terminal" after upgrading python?

But when I try to launch gnome-terminal in the desktop, it fails silently. But in /var/log/syslog, I see:

Mar 25 16:50:14 ray0 systemd[1284]: Started Application launched by gnome-shell.
Mar 25 16:50:14 ray0 gnome-shell[36936]: Traceback (most recent call last):
Mar 25 16:50:14 ray0 gnome-shell[36936]:   File "/usr/bin/gnome-terminal", line 9, in <module>
Mar 25 16:50:14 ray0 gnome-shell[36936]:     from gi.repository import GLib, Gio
Mar 25 16:50:14 ray0 gnome-shell[36936]: ModuleNotFoundError: No module named 'gi'
Mar 25 16:50:14 ray0 systemd[1284]: gnome-launched-org.gnome.Terminal.desktop-36936.scope: Succeeded.

There might be other problems. For example:

# lsb_release -a
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 25, in <module>
    import lsb_release
ModuleNotFoundError: No module named 'lsb_release'

But I am having problems getting a bootable install disk created. I can ssh into the machine from another machine and run things on the CLI.

Is there are way to repair the system in general and the terminal specifically?

5
  • It’s generally not a good idea to “muck around with Python” on most Linux-based systems. This answer from a few years ago may help.
    – matigo
    Mar 26 at 0:17
  • I know that now. :--)
    – Ray Kiddy
    Mar 26 at 2:18
  • So, none of the suggested fixes did anything. Same error.
    – Ray Kiddy
    Mar 26 at 2:18
  • 2
    Sounds like an opportune reason to reinstall the OS, then 👍🏻
    – matigo
    Mar 26 at 2:23
  • I eventually had to make a complete backup of my data and re-install the operating system. One should be able to fix the python environment, or the python environment that the OS uses should not have anything to do with the user-visible python environment.One wonders, why does the OS-required python not use a protected virtualenv? Unless I misunderstand, it seems that this would work.
    – Ray Kiddy
    Sep 22 at 18:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy