×

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 plot multiple linear regression in Python

This article lets us look into linear regression in Python and how we can plot multiple linear regressions in it. Linear regression One of the simplest and most widely used Machine Learning...

4 minutes read.

Expressions in Python

What is Expression in Python? The expression contains more than one operator as well as the operands with it. Expression helps us to produce some other values. In the Python programming...

12 minutes read.

Python vs PHP

Python Python is a high-level, object-oriented, interpreted language that is used to create independent program and algorithms for a variety of applications. It has a large library support base. In 1990,...

3 minutes read.

Python String isupper() method

Python String isupper() method The String.isupper() method in Python returns a boolean value ‘true’ if all cased characters in the string are uppercase else for any other value is returns false. Syntax String.isupper() Parameter NA Return This...

2 minutes read.

How to Convert A List into String In Python?

How to Convert A List into String In Python? List is a data structure in Python that can hold values of different data types. The values are enclosed in square brackets...

3 minutes read.

Difference between Python 2 and Python 3

In this tutorial, we will learn the differences between two versions of python, that is, python version 2 and python version 3. Some basic differences include- Python 2 is the older version...

3 minutes read.

Get index of element in array in python

Index : Index is a number where the element is located in the given list. In other words it is the position of the element in the list. Index can also...

4 minutes read.

Python Function

Python Function A Python function is a reusable, organized block of code that is used to perform the specific task. The functions are the appropriate way to divide an extensive program into a...

7 minutes read.

Python Dictionary update() method

Python Dictionary update() method The dictionary.update() method in Python inserts the specified items to the dictionary. Syntax dictionary.update(iterable) Parameter iterable- This parameter represents a dictionary or an iterable object with key value pairs, that will...

1 minute 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's Qstandarditemmodel

Python More interactive and user-friendly than any other programming language is Python. Many libraries are used by the python programming language to speed up procedures. Python can be used to develop...

3 minutes read.

Python Support

Python Python is an interactive and more accessible language than any other programming language. The python programming language uses a variety of libraries to perform the operations in a faster way....

3 minutes read.

YOLO Python

YOLO means you only look once.It is a technique to perform object detection is called YOLO. It is the algorithmused by the program to identify items in the image. Earlier detection...

4 minutes read.

Python Statistical Module

Python Statistical Module The Python statistical module provides various functions that we can use in our Python program, to perform mathematical statistics operations on the numerical data given to us. The...

8 minutes read.

Python setattr() function

Python setattr() function The setattr() function sets the value of the specified attribute of the specified object. Syntax setattr(object, name, value) Parameter object: This parameter represents any object. name: This parameter represents the name of the attribute you...

1 minute read.

Poolmanager in Python

Python: Python is an interactive and more accessible language than any other programming language. The python programming language uses a variety of libraries to perform the operations in a faster way....

4 minutes read.

How to build a Virtual Assistant Using Python

What is a virtual assistant? A virtual assistant is a new and very interesting concept in today’s world. When we hear the word “Virtual Assistant”, we can easily visualize “Jarvis or...

8 minutes read.

Python And Operator

Python's and operator takes two operands that can be either object, Boolean expressions, or both. And operator creates more complex expressions using those operands. Conditions are the common name for...

8 minutes read.

Python Logging Maxbytes

Python: Python is an interactive and more accessible language than any other programming language. The python programming language uses a variety of libraries to perform the operations in a faster way....

6 minutes read.

Speech Recognition Module in Python

Speech Module in Python: Converting text to speech, known as Speech Synthesis, this process is the computer-generated recreation of human speech. This module converts the human language text into human-like...

8 minutes read.