I had Ubuntu 18.04 running, and then I ran the commands

sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx
sudo apt install python3.7-venv
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt install python3.7
sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/ppa
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

and set the default Python 3 version to Python 3.7.4. I rebooted the system and now the terminal won't open. I also have a small notification in the top right hand corner that says "error occurred while checking for updates".

How do I fix this? Is this because I deleted the repository from the PPA or is it due to having the default as Python 3.7.4? Should I have left the repository in the PPA?

2 Answers 2


You have two Python version installed.

sudo gedit /usr/bin/gnome-terminal

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

Maybe go to sudo update-alternatives --config python3 and set the Python 3.6 as default, or you may found problems with add ppas's, commands not found etc.

  • i have the same problem after installing python3.8-distutils. this one did the trick. thanks man!
    – Jeff
    Mar 27, 2020 at 10:01
  • I think i have the same problem, but I can't open terminal now, so how I run the command you have?
    – HaipengSu
    Apr 10, 2020 at 0:55
  • 1
    I had the same issue as @HaipengSu, that I wasn't able to open the terminal to fix the issue with the terminal. For some reason though if I went into task manager right-clicked on a folder and selected "open in terminal" this actually opened the terminal. At this point, I was able to make the change. Hope this helps. Apr 16, 2020 at 9:11
  1. Open xterm The standard terminal emulator for the X Window System in your OS, if it isn't, you can install it from Ubuntu software

  2. Type sudo update-alternatives --config python3

  3. Choose "python3.6" as a default

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