0

i've just upgraded my OS from ubuntu 18.04 to 20.04 desktop and now python3 is not working. Actually it just seems that there's no "shortcut" called "python3", once python 3.8 was indeed installed during the upgrade.

I've started suspecting it after failing to open a terminal window with Ctrl+Alt+t, as I know that changes in python defaults afect it.

Does anyone know how to configure the system in the right way? So that things work propperly.

Note:

sudo update-alternatives --config python returns

  0            /usr/bin/python2.7   1         auto mode
* 1            /usr/bin/python2.7   1         manual mode

but sudo update-alternatives --config python3 returns

update-alternatives: error: no alternatives for python3
1

1 Answer 1

0

There will not be alternatives if there is only one version of something installed on your system. Python 3.8 ships default with 20.04, and you can verify it's installed by listing the contents of /usr/bin:

$ ll /usr/bin/pyth*

lrwxrwxrwx 1 root root       9  3月 13  2020 /usr/bin/python2 -> python2.7*
-rwxr-xr-x 1 root root 3694632  4月  7  2020 /usr/bin/python2.7*
lrwxrwxrwx 1 root root       9  3月 13  2020 /usr/bin/python3 -> python3.8*
-rwxr-xr-x 1 root root 5486352  7月 28  2020 /usr/bin/python3.8*
lrwxrwxrwx 1 root root      33  7月 28  2020 /usr/bin/python3.8-config -> x86_64-linux-gnu-python3.8-config*
lrwxrwxrwx 1 root root      16  3月 13  2020 /usr/bin/python3-config -> python3.8-config*
-rwxr-xr-x 1 root root     384  3月 28  2020 /usr/bin/python3-futurize*
-rwxr-xr-x 1 root root     388  3月 28  2020 /usr/bin/python3-pasteurize*
-rwxr-xr-x 1 root root    5902  1月 14  2020 /usr/bin/python3-wsdump*

What do you see when you check the version of Python3?

$ python3 --version

Python 3.8.5

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .