Python Installation and Setup

Python is an interpreted programming language, which means when you write your python code in a text file or an IDE, the source code is interpreted into machine code and executed by the CPU.

Before we proceed to writing python, we have to set it up on our personal computer(PC).

Some operating systems come with python already installed.

To confirm if python has been installed just type this in your command line. 

python --version

If python is not installed, you can download it from their official website.

Installing Python in different Operating systems

Windows

Go to the official python website. Click on the download button.

You will see different versions of python for your operating system. I will suggest you download the latest version.

As at the time of writing this tutorial the latest version of python is Python 3.7.1. They might be a newer version when you are reading this tutorial.

Please note that Python 3.5+ cannot be used on Windows XP or earlier.

Once the python .exe file has been downloaded. Double click on the file to start python installation.

In the installation dialog menu box that appeared above, click on Install Now to install python on the specified path.

Waiting until python installation process is completed. You will see a new setup successful dialog box as shown below.

Finally, click the close button to finish with the installation. 

As stated previous, to confirm that python is properly install in our device we need to execute the python –version command in our terminal.

Open your command prompt, type python –version and hit enter.

If everything works fine you will see a similar image like below

Python comes with an IDE(Integrated development environment), which allows us to compile and run our program.

After installation, a program called IDLE is installed alongside with it.

This program allows to write and compile our python code.

You can also use the command line on your PC but for us to be able to do that, we must add python to our environment path as we did during installation.

Mac OS

For Mac OS user, the installation process is almost the same with Windows.

In Mac OS, you can drag and drop the installer file to the application folder and the installation will be taken care of.

Mac installation comes with IDLE an integrated development environment that allows you to both edit your code and see what the output will be after running it.

Apart from IDLE, there are many free and paid Python IDE you can download and use while working with python.

It is easy to use IDLE and Text Editor when you are writing small piece of python code but as the code base starts to grow, it will help to use professional IDE like PyCharm and Visual Studio Code.

In our subsequent tutorials, we are going to write our first python code which is a hello world program.

We will run the code using the command line interface.

Also you will be introduce to PyCharm which provides easy features to run, debug and execute python code.

Next – Hello World Program in Python

Add a Comment