Command Line Interface (CLI)

To use the command line interface, we first need to install Python’s core package. This varies for different operating systems.

Windows

First, download the latest version 3 of Python from this link. Once downloaded, double-click on the installer file to begin the installation.

Sometimes Python may not run properly; in that case, you can check the “Add Python to Path” option, which will directly add the Python installation path to your system’s environment variables.

Click the Yes button to complete the installation.

Linux

Installing Python on Linux is very straightforward. Here, I have installed the Ubuntu distribution of Linux as the operating system. To install, open the terminal (usually by pressing Ctrl+Alt+T) and type:

sudo apt-get update
sudo apt-get install python3.8

The first line of code updates our operating system. Essentially, the installation of Python is done in the second line, where we are using version 3.8. Yes, an internet connection is definitely required for this.

To check if Python has been installed correctly, type the following command:

python3

The following message should appear:

If it doesn’t, then Python has not been installed correctly. Start over from the beginning.

Integrated Development Environment (IDE)

There are several popular IDEs for Python, some of which are listed below:

  • Pycharm
  • Visual Studio Code
  • Jupyter Notebook
  • Spyder
  • Atom
  • Pydev
  • etc

You can install and use these just like any other software. Since we are learning Python here, I will not delve deeper into IDEs. The codes we will learn here can be run using a simple text editor and the command line.

Online IDE

If you prefer, you can run Python code using some online IDEs without installing Python on your machine. You can even run code from your mobile phone in this case.

For obvious reasons, I am not providing any links to IDEs. You can find many IDEs by searching for “Python online IDE” on the internet.

I hope you have gained a comprehensive understanding of the Python environment and have been able to set up the Python environment by following the instructions

0 0 votes
Article Rating
0
Would love your thoughts, please comment.x
()
x