I have upgraded python to version 3.7 and now my terminal is not opening up.

I followed this post https://jcutrer.com/linux/upgrade-python37-ubuntu1810

Commands I ran are as follows,

sudo apt-get install python3.7
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
sudo update-alternatives --config python3

Entered 2 for python3.7

I can't open terminal and run commands.

My ubuntu version is, Ubuntu 18.04.2 LTS


I ran the command

sudo update-alternatives --config python3

Entered 1

I got my terminal back.

Still wonder why it wasn't working with python3.7.1 though.


This way the upgrade to 3.7 is useless. You should edit the gnome-terminal file:

Open a terminal and issue the following commands:

cd /usr/bin
sudo nano gnome-terminal

Change #!/usr/bin/python3 to #!/usr/bin/python3.6.

This way you can still use the power of 3.7 and solve the issue with the terminal.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.