-3

On Ubuntu 18.04, I uninstalled python* which led to uninstallation of ubuntu-desktop and many other apps. I installed python3.8 and then ubuntu-desktop.

Now I can run command line on ctrl+alt+F3 but I cannot run it under graphical environment. I also tried

cp /etc/skel/.bashrc ~

Followed by logging again and it didn't help.

I also do not know the name of the graphical bash to try reinstalling.

What should I do?


Note: I also set python3.8 as alternative for python. Not sure that makes problem.

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2
sudo update-alternatives --config python

And still having problem.

ar2015
  • 437
  • 1
  • 9
  • 19

2 Answers2

2

Ubuntu relies heavily on python, so by removing python the tools that require it to function need to also be removed.

The tools also are built for a specific version of python, so if that version isn't available, you'll find they may no longer run (tools such as gnome-terminal requires the python it was built for; what came with your release; that was what it was tested to run with; if your system doesn't have that version - it may not run, or may not run correctly).

https://packages.ubuntu.com/bionic-updates/gnome-terminal

guiverc
  • 33,561
-4

it was fixed after

sudo update-alternatives --config python3

and pointing to python3.6 instead of python3.8.

By the way,

/usr/bin/gnome-terminal

has a head that starts with

#!/usr/bin/python3

Nothing to do with python2.

Still not clear what is the cause.


Update:

You do not need to change the default python version.

Just run

sudo nano '/usr/bin/gnome-terminal'

and change the header to:

#!/usr/bin/python3.6

Done.

Just ensure on the next software update, it is not overwritten.

ar2015
  • 437
  • 1
  • 9
  • 19