Setting up a Python environment in Linux
Let's go through the step by step process of setting up your Python environment on your Linux system. First, we can learn to install Python if it's not installed by default.
Getting ready
As we have many package managers in different flavors of Linux distributions such as apt
/apt-get
and dpkg
. For Debian-based distributions such as Ubuntu, yum
(Yellowdog) for CentOS/RHEL, and zypper
and yast
for SuSE Linux, these package managers will help us to install Python with ease in Linux distros. With this, you have to just issue a command and package managers will search for the required package and its dependencies, download the packages, and install them in your system.
How to do it...
First, you have to install Python on your system.
Installing Python
- If you are using a Debian-based distribution such as Ubuntu you can install Python with:
$ sudo apt-get install python
If your system runs CentOS/RHEL, use the following command to install Python:
$ sudo yum install...