Python Installation & Set up

August 23, 2021, Learn eTutorial

In this tutorial, you will master how to install and set up python in your system. If you are a beginner and don’t know how to get started, this python installation and setup tutorial is definitely for you. This tutorial will teach you to check the existence of python in your system and if not available, will guide you to address the questions like How to install python for free, Which version of python should I install, What are the python installation commands to be used, how to set up the environment for python, etc.

Now a day’s most PCs and MACs have python already installed. So initially we need to check if python is already there in your system or not by following the below steps.

1. How to Check Python is Installed or Not

For Windows

  • Open the command prompt on your computer by typing “cmd “in the search bar.
  • Simply type ‘python’ in your command prompt and you will get a screen like below if python is already available in your windows
  • If it is not there you will get a message showing python is internally and externally not available

For Mac/ Linus

  • type python –version

2. How to Download & Install Python for Free

If you cannot find python in your system, you need to download and install python for free using the below link and follow the steps which are clearly mentioned below.

  • Either click on this link or use the link in any browser like google chrome, internet explorer, etc. which will open python's official website.
  • Hover over the download tab and you will get a screen as shown below.
  • Choose your system, either windows or mac. We choose the windows here.
  • Now comes the question of which version of python should I install. We would suggest python version 3.8.3 which is the latest version
    1. To choose a suitable version, you need to know about computer specification prior to downloading
    2. To know about your system just right-click on the Start menu and then click on ‘system’.
    3. An ‘About ‘window will open where you can find device specification and windows specification.
    4. Under device specification, you will get system type which gives you the idea that whether your system is 32 bit or 64 bit.
    5. You can choose your python version based on system type either 32 bit or 64bit.
  • Once the download is complete, run the .exe file to install python by clicking the Install Now button. Also, tick the checkbox (Add Python 3.8 to PATH) underneath to automatically create a path
  • A setup progress screen appears to you and wait till it finishes
  • Finally, you will get a screen showing ‘Set up was successful’. To finish off you need to click the close button
  • Open the command prompt again and type ‘python'. If the installation is successful you will direct to python interactive shell

3. How to Set up Python Path

A path is an environment variable in OS which is used to specify a set of directories in a file system. All executable programs are located in directories. Below gives you the example of a python path where the installation is a pdf document located in a folder called python which in turn is in a folder named Tutorial.

C:\This PC\Documents\Tutorials\Python\Installation.pdf

In order to establish a connection with the editor, we need to set up the path either automatically or manually. Nowadays automatic path setting is possible, However, If the connection with the editor is missing you need to set up the path manually

  • Right-click on “my computer” and go to properties - then click on the Advanced tab where you can find the  Environment Variables. This is done to set up the path
  • Add the new path in the user variable section. Type Path as the variable name and set the path to the installation directory of the python as shown below.
  • Now the path is ready. Restart the command prompt and type python again to check if the connection is established successfully or not
  • If yes, the python interpreter shell will open where you can execute your codes
  • If not, check the location where python is installed and try the above steps again checking the path.

However, it is not mandatory to install python on your computer to learn this tutorial as we are providing the interactive python shell for hassle-free learning.