0

I have an ubuntu 20.04 Desktop that comes with Python 3.8 by default.

How do I make Python 3.9 default Python? I had to install this manually.

When I SSH into the machine I was just run alias python=python3.9 in terminal to temporarily make Python 3.9 default. How do I get rid of this step? I don't need Python 3.8 at all, like it could be removed.

4
  • Try: sudo apt-get update && sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove to get rid of old packages. Restart when done.
    – John
    Jun 27 at 21:13
  • I ran the command you listed but after the reboot typing python into terminal Python 3.8.5 is still default. Any ideas to try? Thanks
    – HenryHub
    Jun 28 at 16:32
  • I do not know for certain. Try removing Python: sudo apt remove python[version] and then again sudo apt autoremove. That may remove the older version.
    – John
    Jun 28 at 16:36
  • @John afaik you should never remove the python version that comes with ubuntu. ubuntu needs it and it may break your distro install
    – joel
    Jul 30 at 18:55

Your Answer

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

Browse other questions tagged or ask your own question.