How Do I Switch Between Python Versions in Ubuntu?
Contents

How do I switch between Python versions?

To switch between python version over the all users, we can use update-alternatives command. We will set priority of each version using update-alternatives. Python executable with the highest priority will be used as default python version.

How do I change python to 2.7 in Ubuntu?

8 as the default in Ubuntu 18.04 from Python 2.7 you can try the command line tool update-alternatives . Change the path /usr/bin/python3 to your desired python version accordingly.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest