I have Ubuntu 19.04 OS and I needed python 3.6 version so I somehow managed to get python3.6 on my device without removing python3.7 but now I would like to revert back to using python3.7. Can anyone suggest how to do it?
Asked
Active
Viewed 72 times
-2
-
"Somehow"? I suppose those details are important. Also it sounds more like a question for AskUbuntu. – a_guest Mar 24 '20 at 15:36
-
Does this answer your question? [upgrading default python version or install another python version in Linux](https://stackoverflow.com/questions/18957836/upgrading-default-python-version-or-install-another-python-version-in-linux) – Vasco Cansado Carvalho Mar 24 '20 at 15:36
-
There is a similar question here: [post](https://stackoverflow.com/questions/18957836/upgrading-default-python-version-or-install-another-python-version-in-linux) – Vasco Cansado Carvalho Mar 24 '20 at 15:37
2 Answers
1
If you've got multiple version of Python installed, you can choose which one to use as default in update-alternatives
:
sudo update-alternatives --config python3
, then follow the prompt instructions.

0buz
- 3,443
- 2
- 8
- 29
-
update-alternatives: error: no alternatives for python3 I am getting this – Subhang V Mar 24 '20 at 15:50
-
-
-
-
-
Try this then: `sudo update-alternatives --config python` (without '3' at the end). – 0buz Mar 24 '20 at 16:08
-
Had already tried that. Got this ```update-alternatives: error: no alternatives for python3``` – Subhang V Mar 24 '20 at 16:10
-
Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/210244/discussion-between-subhang-v-and-0buz). – Subhang V Mar 24 '20 at 16:15
1
Try using virtual environments, namely anaconda for these kinds of things. I am not aware of any other methods. Anaconda basically creates a virtual environment in which you can specify the version of all packages including python itself

Ritwiz Sinha
- 39
- 4