![]() If you have Python 2 and Python 3 installed on Ubuntu simultaneously, you can switch between which default version the system uses. ![]() ![]() Switch Between Python 2 and Python 3 on Ubuntu To use Python 2 as your default Python version, you can install the python-is-python2 package. You can verify successful installation with this command: $ python2 -version Execute the following commands to install it, along with its required dependencies. Python 2 is available for installation from Ubuntu’s package repositories. Note that it’s possible to install Python 2 along with Python 3 on Ubuntu. It’s no longer supported, but you may find a need to install Python 2 on Ubuntu for legacy Python scripts. The last release of Python 2 was version 2.7. To allow use of the python command, in place of the python3 command, you can also install the python-is-python3 package. For Python developers, pip is an essential tool. On Ubuntu, pip allows for easy installation of Python programs and dependencies. There’s a good chance that you’ll also want to install pip. You can verify successful installation with this command: $ python3 -version This command will also update Python to the latest version. ![]() Python 3 is available for installation from Ubuntu’s package repositories. ![]() If it’s not installed, follow the steps below to install Python 3 on Ubuntu: It may already be installed on your system by default. Python 3 is the latest version of the language. This tutorial will show you how to install Python 2 or Python 3 on Ubuntu 20.04. How to Install Python on Ubuntu 20.04 and 18.04? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |