×

Python Setup guide and installation

Python Installation guide Step by Step

Python is widely used high-level programming language. The first version of Python was launched in 1991. Since then, Python has been gaining popularity. It is considered as one of the most user-friendly and flexible server-side programming languages.

To start working with Python, you need to install the Python interpreter. Unlike most Linux distribution, Windows does not come with the Python programming language by default. However, there are few easy steps to install Python on Window server or the local machine. There are several common ways to achieve this:

  • Python can be downloaded from the Python Software Foundation website at www.python.org. Generally, it includes downloading a suitable installer for your operating system and running it on your machine.
  • The best way to install Python in macOS is by installing a package manager called Homebrew.
  • In Linux, it provides a package manager, which can be run to install Python.
  • For a mobile operating system like Android and IOS, you can download apps that offer a Python programming environment.
  • There are several websites which provide a Python programming environment. You can practice coding on these websites without installing Python.

Python Installation on Windows

First, you need to choose a Python version. If you want to learn the latest version of Python, you will need to install Python 3.7. You can install it alongside 2.7, but this version is no longer use in industry.

There are few steps to install Python on Window. These steps are given below:

Step-1 Set Up for Download

  1. Open a browser and visit the official site of Python www.python.org. It will get you on the home page of the website.
Python Installation Step 1
  • Navigate to the Downloads section and then click on Windows option. Search for the desired version of Python. The latest version of Python 3 is version 3.7.4, while the latest Python 2 release is version 2.7.16. Consider the below image:
Python Installation guide

Step-2 Select Installer:

Select a link either window x86-64executable installer to download Python for 64-bit OS or window x86 executable installer for 32-bit OS.

Note: For Windows, you can choose either the 32-bit or 64-bit installer. On a 64-bit system, either installer will work for most purposes. The 32-bit version will generally use less memory, but the 64-bit version performs better for applications with intensive computation according to the operating system.

Python Installation Step 2

If you are not sure which version to pick, go with a 64-bit version. But if you get the "wrong" choice and would like to switch another version of Python, you can easily uninstall Python and reinstall another installer.

Step-3 Run the installer

Once you download the installer, run that installer.

  1. Select the install launcher for all user and Add Python 3.7 to Path checkbox. Older versions of Python do not support the Add Python to Path checkbox.
  2. Click on install now option, which is the recommended installation options.

Note: Older versions of Python might not contain such additional features. But in all recent versions of Python, recommended installation options include Pip and IDLE (Integrated Development and Learning Environment).

Python Installation step 3
  • The next dialog box prompt, "Setup was successful." You can select "Disable path length limit”, by choosing this option, it will enable Python to use long path names.
Python Installation

Step-4 Verify whether Python is installed or not

  1. Navigate to the directory in which Python was installed on the system. In our system it is C:\Users\Username\AppData\Local\Programs\Python\Python37, Since we have installed the latest version of Python
  2. Double-click on "python.exe" which is called python executable file
  3. You can also check it by typing "python –-version" on command prompt. It will display the version of Python. If Python is successfully installed, then it will produce the following output.
Python Installation step 4

Step-5 Verify whether Pip is installed or not

Pip is a powerful package management system for Python software packages. If you install an older version of Python, it is possible that Pip would not be pre-installed.

a) It is recommended to use Pip for most Python Packages, mainly when working in virtual environments.

b) To check whether Pip has been installed

i) Open the Start menu and type cmd

ii)   Open the Command Prompt application.

iii) Enter pip –-version in the console. If Pip is installed successfully. It will display the following output

Installation Guide step 5

But if pip would not be installed yet, you get the following output:

"pip is not recognized as an internal or external command, operable batch file."

Step-6  Setting to Environment variable  (Optional)

If you have not selected Add Python to PATH checkbox or if your version of the Python installer does not include then you go through the below steps:

Open the Start menu and click on ÿ+R.       

  1. Type sysdm.cpl and click ok. This will open the System Properties window.
  2. Navigate to the Advanced tab and select Environment Variable.
Python Installation Guide 6
  • Under System Variables, find and select the Path variable and click Edit.
Python Installation
  • Select the Variable value field. Add the path to the python.exe file preceded with a semicolon(;).

Step-7 Virtual environment (virtualenv) installation (optional)

Virtual environment (virtualnv) creates isolated environments for your Python application and allows you to install Python libraries in that isolated environment instead of installing them globally.

Why use virtualenv?

Suppose, you develop an application, and you do not want to make any change to the libraries it is using. At the same time, you start developing another application which requires the updated versions of those libraries, so at that time virtualenv comes into play.

To install virtualnv: Open Command prompt application and type the following command

C:\User\Username> pip install virtualenv

Upon completion, virtualenv will be installed on your system.


Related Topics

How to print in the same line in Python?

How to print in the same line in python By default, the print function in Python takes us to the next line and prints the desired statement in the output. In this...

5 minutes read.

Python elif

Python elif The elif statement is used to check multiple conditions and execute the specific block of statements depending upon the true condition among them. Syntax if expression1: statement elif expression2: statement elif expression3: statement else: statement The elif statement can be optional...

3 minutes read.

Python Set symmetric_difference_update() method

Python Set symmetric_difference_update() method The set.symmetric_difference_update() method in Python updates the original set by removing items that are present in both sets and inserting the other items of the set. Syntax set.symmetric_difference_update(set1) Parameter set- This parameter represents the first...

2 minutes read.

Python Trigonometric Functions

Before jumping right into the functions and how to use them we need to know what do trigonometric functions mean and how many functions does python has. What are Trigonometric functions? Trigonometric...

3 minutes read.

Python String isspace() method

Python String isspace() method The string.isspace() method returns a Boolean value true if there are only whitespace characters in the given string. This function is used to check if the given...

2 minutes read.

Best Database for Python

Database The collection of structured data or information in an organized format in a computer system is known as Database. The data is inserted, deleted, updated, controlled, or manipulated in a...

6 minutes read.

Cube Root in Python

In general, the cube is a three-dimensional solid figure that has 6 square faces. It is also called a geometrical shape with six equal faces, eight vertices, and twelve edges....

3 minutes read.

Python String rsplit() method

Python String rsplit() method The string.rsplit() method in Python splits a string into a list, starting from the right. If the "max" parameter is not specified, this method will return the...

1 minute read.

Python eval() function

Python eval() function The eval() function in Python is used to evaluate the given expression. If the specified expression is a legal Python statement, it will be executed. Syntax eval(expression, globals=None, locals=None) Parameter expression: This parameter represents a String,...

1 minute read.

Keyboard Jump Game in Python

Keyword hop (jump) game is a speed composing game that aides in further developing the composing velocity of players The object of Keyboard Jump (hop) Game Python Project is to fabricate...

7 minutes read.

Idle python download for Windows

Here, we will be discussing how to get the answer to all questions related to installing Python on Windows. What is IDLE? Integrated Development and Learning Environment, or IDLE, is a shorthand....

3 minutes read.

Program of Cumulative Sum in Python

Introduction This tutorial, explains what is meant by lists, the cumulative total, several approaches to calculating the cumulative sum of digits in a list, etc. Learn the straightforward Python codes for...

5 minutes read.

Cross Validation in Sklearn

Data scientists can benefit from cross-validation in machine learning in two key ways: it can assist in minimising the amount of data needed and ensure the artificial intelligence model is...

14 minutes read.

Python exit commands

exit(), quit(), sys.exit(), os._exit() In this tutorial, we will study exit commands used in the Python programming language. Python is undoubtedly the choice of programmer and this is because of the in-built...

3 minutes read.

Best Python AI Projects

Artificial consciousness is advancing quickly, from Chabot's to self-driving vehicles. Because of the various advantages and development presented by AI, numerous enterprises have begun searching for AI-fueled applications. Thus, there...

7 minutes read.

Conditional Expressions in Python

In Python conditional expression are sometimes referred to operator called as ternary operator. Not only Python supports ternary operator but many other programming languages supports it. Ternary operator are the...

2 minutes read.

How to Plot Graphs Using Python?

In this article, we are going to learn about how to plot different types of graphs using Python. We are going to use different approaches for every type of graph....

3 minutes read.

Amazon rekognition using python

Amazon recognition service is an AI service which is an image labelling API (Application programming interface). In this article, we shall learn to use the AWS python boto3 module to...

3 minutes read.

Python MySQL

In this article, we are going to learn the following: How to connect Python to MySQL.How to create a new Database.Procedure for connecting the newly created database.Procedure for connecting the already...

7 minutes read.

Returning Multiple Values in Python

Python is considered a general-purpose programming language; it is a high-level programming language that is not much difficult and easier to learn. It is rich in libraries that can be...

3 minutes read.