Install Python on CentOS
Install Python on CentOS
This tutorial will show you how to install Python on CentOS Linux using a few Terminal commands. Before proceeding, check if the python3 package is installed on the machine.
$ python3 -V
If the command output displays the Python version, then the software is already installed on the machine.
Update Packages
Launch Terminal.
Issues the following command to update the currently installed packages on the CentOS Linux box.
$ sudo yum update
If the user is not able to run the sudo command, We may need to add the user to the sudoers file. Command to edit the sudoers file is:
$ visudo
Install Python
Issue the following command to install Python:
$ sudo dnf install python3
This command will install the Python package on the machine. The command will let you know, just in case, if the package is already installed on the machine.
Check the installation.
$ python3 -V
This command should display the Python version on the computer screen.
We can consider installing IDLE from the
Applications >> Software >> Developer Tools.
IDLE
IDLE is Python’s Integrated Development and Learning Environment. The GUI is uniform between Linux, Windows, and Mac OS. IDLE provides an easy way to start writing, running, and debugging Python applications.
Python Shell Interactive interpreter on CentOS
That’s it. We have successfully installed Python on a CentOS Linux machine.
—
Python Tutorials
Python Tutorial on this website can be found at:
https://www.testingdocs.com/python-tutorials/
More information on Python is available at the official website:
More Information on CentOS: