I have three python folders in /usr/lib: python2.7, python3, python3.8 and python3.9 The python3 --version command returns the following:

Python 3.9.0

even though I uninstalled that specific version with

sudo apt remove --purge python3.9

successfully (or so I thought). I would like to make python 3.8 the default, so that when I type python3 it gets called up. I tried to follow some of the other answers on the topic, without success. Not sure if it means anything or if it's supposed to be like that, but the python command tells me there's no package with that name. By the way, I'm on Mint 20 up to date.

  • What does update-alternatives --list python return? Nov 24 '20 at 17:07
  • it says there are no alternatives for python
    – dev.uaila
    Nov 24 '20 at 17:18
  • Did you create an alias to python3.9? I would do a quick search for python3.9, both packages and files/directories, just to see what was left behind. Nov 24 '20 at 17:20

An alias alone might not be enough. Sure you can create one in your .profile and source that before your shell starts but some applications/dependencies my still find 2.7 as your default. This is because of the symlink found in usr/bin. Create a new one in that location and point it to the interpreter you wish to use.

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.