Ad Clicks : Ad Views : Ad Clicks : Ad Views :

How to upgrade to python 3.7 on Ubuntu 18.10

/
/
/
2343 Views

In this article, we upgrade to python 3.7 and configure it as the default version of python.

I was just trying to upgrade my python and I find it a little bit hard to do. Python 3.6 is the default version that comes with Ubuntu But the latest version is Python 3.7.3.

So lets start, First run this command to test the current version installed of python.

python3 -V

Also Read: How to Install Open Source Zimbra 8.8 Mail Server (ZCS 8.8.12) on Ubuntu 16.04 LTS

My current version is Python 3.6.5 but Yours may different.

upgrade-to-python3.7-current-python-version

Install Python 3.7

Follow the simple steps to install and configure Python 3.7.

Step 1: Install the Python 3.7 package using apt-get

install python by typing below command :

sudo apt-get install python3.7
upgrade-to-python3.7-install-python

Step 2: Add Python 3.6 & Python 3.7 to update-alternatives

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2

Also Read: Backup all MySQL Databases with a MySQL Backup Script

Step 3: Update Python 3 to point to Python 3.7

By default, Python 3.6 is pointed to Python 3. That means when we run python3 it will execute as python3.6 but we want to execute this as python3.7.

Type this command to configure python3:

sudo update-alternatives --config python3
upgrade-to-python3.7-configure-python3

You should get the above output. Now type 2 and hit enter for Python 3.7. Remember the selection number may differ so choose the selection number which is for Python 3.7.

Step 4: Test the version of python

Finally test the current version of python by typing this :

python3 -V

You should get Python 3.7.1 as output.

In this article, we learn how to upgrade python to the latest version that is 3.7 in Ubuntu 18.10.

Share your thoughts in the comment section. Happy Learning …!!

Also Read: “How to install Ubuntu 18.04 LTS with screenshots

  • Facebook
  • Twitter
  • Google+
  • Linkedin
  • Pinterest

4 Comments

Leave a Reply

This div height required for enabling the sticky sidebar