Install Python is very simple and we will see it in detail on all systems. But before installation let’s make a brief introduction to this amazing programming language
Python is a language that adapts to multiple fields, such as websites, computer science, and artificial intelligence. During this tutorial we will therefore explore the various areas of expertise.
In this lesson we will see how to install Python. First let’s make a brief introduction of this fantastic programming language.
It is a language that supports object-oriented programming and is being addressed more and more, even in universities.
There are numerous frameworks developed for Python and often represent optimal solutions for quickly building applications. Among these we will deal with Flask and Django, two important open-source web frameworks, useful for creating simple internet and e-commerce sites.
I will also mention Plone, a CMS (Content Management System) used to manage a website with ease.
This last part will therefore be useful for those who want to work with these tools.
How to install Python?
To install, go to the official website: https://www.python.org/downloads/ and download the version suitable for your operating system.
Windows
First we show the installation of Python in a Windows environment.
As soon as the installation starts, you will be asked for some options, make sure you select the Add Python 3.X to PATH item.
But, if you forget to do so, don’t worry, you can still change this option by going to: control panel -> system-> advanced system settings -> environment variable.
As well as from the pictures shown below.
Then click on the edit button and add the path specifying the appropriate path.
Alternatively, you can launch the executable again, click on modify and add the check mark on Add Python to environment variables.
The Python installation is complete
Working in interactive mode
After installing Python on your PC, you can start working in interactive mode or creating scripts that can then be executed.
The interactive mode allows you to interact directly with the interpreter, this is only convenient at the beginning to learn how to do some small tests.
To work in this mode, you need to start the IDLE. IDLE is software that allows both to work interactively and to create scripts.
Starting it, the interactive interpreter will be presented with the cursor positioned after the symbol: >>> (triple major sign), the Python shell.
You can consult information about the language specifications by entering the help() command.
After entering the help, you can request, for example, information on the individual instructions of the language.
Then try to request the if statement, you will see information on the use of this statement.
To exit the help you need to type quit.
You can also avoid entering the help by typing, after the >>> symbol, the word help followed by the required term inserted in quotes inside the round brackets.
For example help (‘if’).
Well in this guide we have seen the installation of Python, in the next tutorial we will start creating our first Python program.
Useful links
1 – Introduzione al linguaggio Python