Configuring Multiple Python Versions using Update Alternatives

by | Aug 24, 2023 | Ubuntu | 0 comments

Adding Python 3.6 and Python 3.8 to Update Alternatives We will now include both the earlier and newer versions of Python in the Update Alternatives tool
To achieve this, follow these commands:

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

Updating Python 3 to Point to Python 3.8 By default, the system directs Python 3 to Python 3.6. Consequently, when the command python3 is executed, it invokes Python 3.6. To align this with our intention of using Python 3.8, implement the subsequent command:

sudo update-alternatives --config python3

Test the current version of python by typing this

python3 -V


By Aadhil PM



Submit a Comment

Your email address will not be published. Required fields are marked *