Home » Python » How to install Python & Setup Environment

How to Install Python (Environment Setup)

Python supports multiple platforms and in all these platforms the first step to start Python development is to download Python. In this tutorial we will see various steps on How to Install Python on various platforms.

Python will need about 90 Mb of total space after installation consisting of additional space. Let's see how to install Python on Windows:

Installation on Windows

Step 1: Visit the website Python.org to download the latest stable version of Python. A the time of writing this article the latest version is Python 3.9.0.

Step 2: After downloading the file, Open it and an installation menu will open. Go for Custom Installation to choose the location where you want to install Python.

Step 3:Now you will see some advance options, some are checked by deafult. You won't understand them right now so don't make any changes but change the location if you want and then click on Install.

The installation of Python will begin.

Step 4: After the installation, we will check the python command in Command Prompt to ensure whether it is working properly or not. Type the command python and hit Enter.

If you are getting the same result as above image then Python has been installed successfully in your system.


Setting path at Windows

  • Go to System Properties, then click on Advanced, here youw ould see Environment Variables. Click on it.
  • You will find the variable 'Path', if not then create a new variable with name 'Path' and in the value section, paste the path of Python directory(Python.exe) and press Enter.
  • If the Variable is already present then select it and click on edit. If there is aleady a value present then put a semicolon(;) at the end and paste the python directory Path otherwise directly paste it without semicolon.

Unix and Linux Installation

  • Open a Web browser and go to.
  • Visit https://www.python.org/downloads/ ,download Gzipped source Tarball for Unix/Linux.
  • Extract the files.

For building, run the following commands:

  • ./configure script
  • make
  • make install

The default path for Python after this installation will be /usr/local/bin.

For step by step guide to install Python, go through this Documentation.


Python Environment Variables

Some Important Python Environment Variables

Sr.No. Variable & Description
PYTHONPATH Pythonpath is also used to set up path just like the 'Path' Variable. It is used when we have to set up some additional libraries and modules path. It is not necessarily required but only when you want to import some new modules.
PYTHONSTARTUP It contains the location of a Python script. This script will execute automatically whenever you will enter the interpreter. It helps in pre loading some frequently used modules in the interpreter or for setting colors.
PYTHONCASEOK It is a Windows only Environment Variable. It instructs Python to ignore the case during the import statements parsing. To activate the variable, just set assign any value to it, ex. PYTHONCASEOK=x.
PYTHONHOME It defines a default search path for modules.



Color Picker

List of color names supported by all browser »



Character Code

List of character codes to display special character »



Language Code

List of all language supported by all browser »



Country Code

List of Country code supported by all browser »