
sudo update-alternatives -install /usr/bin/python3 python3 /usr/bin/python3.8 1 If you have multiple versions installed, you just need to cd to /usr/bin, check what the path names are, and then use update-alternatives to configure which version is the default. Changing version of Python3Ĭhanging the version associated to python3 is pretty easy to find instructions about. This guide describes the process for Ubuntu 18.04.4 LTS. This proved nontrivial and totally undocumented anywhere I searched, so here’s an explanation of what I did so that I have a reference of what to do for next time, yay! $ sudo python3.I wanted to change my Python version associated with pip from 3.5 to 3.8. Now you can check the version using below command. $ sudo make altinstall Step #4 Check the Python Versionįinally, you have successfully installed Python 3.6 on your system. Note: If you want to used to prevent replacing the default python binary file /usr/bin/python. Now use below commands to compile python source code on your system. You can also download latest version using the below command. You can download the python from official site. $ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev Step #2 Download Python 3.5.6 $ sudo apt-get install build-essential checkinstall

Use the following command to install required packages.

