Setting python 3.9.4 as default

Tags:

Answer: 1

33 hours ago

so i'm currently running ubuntu 20.04 on WSL2 (i'm also a newbie in linux) and i use python inside it, and recently i install python 3.9.4, is there's any way to remove python 3.8 and setting 3.9 as default ? i didn't try anything yet since idk much (yet) about linux especially ubuntu

Answer: 2

31 hours ago

  1. Do not change the default version of Python3 installed with Ubuntu.
  2. Do not change the version of Python3 that the python3 command points to -- keep it the system default.

Making either of those mistakes will break your Ubuntu system quite horribly. Your Ubuntu system makes extensive use of Python3, and is built against the specific version included. DON'T change it.

You CAN install other versions of Python3 in addition to the system default.

  • You cannot easily install additional versions of Python3 as deb packages. That's a limitation of how debs work.
  • You CAN use other methods: Conda and manual installs are two popular ways.
  • When you use different methods of installing software, it's YOUR job --as the human-- to keep track of what you installed, when, where, why, and how. Apt is deb-only and won't track other methods for you. Advice: Keep a journal.

If you must use a different version for python3, wrap that application inside a venv to protect your system from the customization.

Also, note that Ubuntu 20.04 was released before Python 3.9 became available. Newer releases of Ubuntu include Py3.9. Ubuntu is not like Windows in many ways -- for newer software, it's generally easier to run a newer release of Ubuntu rather than try to bolt new software onto an older release.

Added by: Drew Christiansen

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9