I am using Ubuntu 19.10 and I have python 2.7 installed on it. I want to upgrade to python 3.7 on it. How do I do it? I have downloaded https://www.anaconda.com/ for 3.7 version of Linux and installed it. Does it do the needful or I need to install or upgrade to python 3.7. If I have to do then how should I do it?
edit this was a Ubuntu 19.04 virtual machine which was upgraded to 19.10 not a clean install. The VMware image for 19.04 was downloaded from www.osboxes.org/ubuntu
debian@osboxes:~$ python -V
Python 2.7.17rc1
There is no need to use Anaconda or any other third party packages.
Both Ubuntu 19.04 and Ubuntu 19.10 come with Python 3.7 as default Python version.
You can check this with
python3 --version
in a terminal.python
will and also should refer to Python 2 - this was decided in order to not brake compatibility. Do not try to change this, or you could break parts of your system.https://www.python.org/dev/peps/pep-0394/
Just install python 3
and you can use python 3 with the command:
python3
thats it.
To install python3.7:
To make the 'python' command default to python3.7 instead of python2.7:
Hope this helps.