gamerbas.blogg.se

Python 2.7.9 terminal update
Python 2.7.9 terminal update









python 2.7.9 terminal update

To switch to another Python version, all you need to do is execute the command on Step 4 and select the other option.

python 2.7.9 terminal update python 2.7.9 terminal update

python -version Check the currently running Python Version Step 5) Now, let’s check the Python version currently running on our system. In this post, we want to use Python 2 therefore, we will enter option 1. On the prompt that appears on the Terminal, enter 1 or 2 to make your selection. $ sudo update-alternatives -config python Confirm the Python Alternatives set Step 4) We need to confirm the Python alternatives set and whether they are in use.Įxecute the command below again. $ sudo update-alternatives -install /usr/bin/python python /usr/bin/python3 2 Configure Python Alternatives $ sudo update-alternatives -install /usr/bin/python python /usr/bin/python2 1 From the image in Step 2 above, we saw that I have Python 2.7 and Python 3.8 present on my system.Įxecute the commands below on the Terminal. Step 3) Now, we will configure two Python alternatives. sudo update-alternatives -list python Check for any Python alternatives configured on the systemįrom the image above, we see that there are no Python alternatives configured. Step 2) Once we have listed all the versions present on the system, we need to check whether there are any Python-alternatives configured.Įxecute the command below on the Terminal. ls /usr/bin/python* Check all the installed Python versions in the bin directory In such situations, the –version command won’t be useful as it only lists the currently configured version.Įxecute the commands below on the Terminal. That is because we can have variations in Python 3. To do so, we will need to check the /bin directory. Step 1) Check all the available Python versions in your system.

Python 2.7.9 terminal update how to#

How to switch between Python 2 and 3 versions on Ubuntu 20.04 Method 1: My recommended way by configuring Now, let’s jump on to one of the important parts of this tutorial of how to configure Python and switch between the two versions – Python 2 and Python 3. From the image above, we can see we are running Python 2.7 and Python 3.8.











Python 2.7.9 terminal update