Python Installation Tutorial: A Step by Step Complete Guide

Python Installation Tutorial

Python is the popular programming language. In-fact you will see the code of python language as English language. Python 2 and Python 3 are the two major versions of Python. But , Python Installation for both the versions are different. In addition ,Commands and path environment variables for both the versions are different. You can choose your python version according to your requirement. Beginners always faces challenges of installing Python in their operating system. This article Python Installation tutorial is for them. Introduction to Python Programming  article is a complete guide for beginners to know more about Python.  You will know how to install python in Windows, Linux, MacOS. How to check your Python versions . You make sure to install python carefully by reading all the steps described here otherwise it may be wrongly install.

Python Installation Tutorial for Windows

In this section, you will know how to do Python installation in the Windows OS. First we will cover for the latest Python 3 version and then Python 2 version. You can either install both the versions or choose the version according to your end goal.

Python 3 Major Version Installation

Step 1 – Download the latest Python 3.x version. At the time of writing this article latest version was Python 3.6.4. Download Windows x86 – 64 executable file only as installer will automatically install 32 or 64 bit of Python according to the system configuration.

Python Releases for Windows Python org
Python Releases for Windows

 

Step 2 – Open the executable file and Check the Add Python 3.6 to PATH. Then click the Install Now button. It will show the installation progress.

python installation 3.6 Setup1

Step 3 – When the installation progress is completed, you will see the Disable path length limit. Now you must be thinking what is it and whats will happen if I will disable it.  The answer is clear, it will remove the limitations on MAX_PATH variable. It will allow to use long path names for the Python. We recommend you to not disable this option as it will remove any path related issues while working in Windows. Therefore click on the close button to finish the installation.

Python 3.6 Setup2

Step 4 – Now, the Python 3.6 is installed. You can check it either it is properly installed or not. You can do it through Command Prompt. Open the command prompt and type the following command. It will output the version of the Python.

Python 3.6 Setup3

Congratulation, you have successfully installed Python 3 version. In the next section you will know how to install Python 2.x versions. If you want to know the difference between Python 3 and Python 2 ,features and application, you can read the Introduction to Python Programming , a complete guide for beginners.

Python 2 Major Version Installation

Step 1 – Download the latest Python 2.x version. The latest version at the time of writing this article is Python 2.7.14. You can also download the other versions by scrolling down. But we recommend you to download the latest releases. Choose the Windows x86-64 MSI installer to install in 32 bit or 64 bit Windows OS.

Python 2.x Releases for Windows Python org

Step 2- Run the installer and select install for all users. Click “next ” button to continue.

Python 2.7.14 Setup1

You will see the choice to select destination directory. Leave as it is and click the “Next Button”.

Python 2.7.14 Setup2

Step 3 – After the step 2 you have to do some customization. Scroll down and click on Add python.exe to path and select “Will be installed on local hard drive“. Then click on the Next button to complete the installation progress.

Python 2.7.14 Setup3

Step 4- The Python 2.7.14 had been installed. In addition you have to check whether it has been properly install or not. You have to use the same following command. It will output the python version.

python -V

 

python 2..7.14 command prompt

If you are seeing the above output, then congratulation you have successfully install the Python 2.7.14 version.

Python Installation Tutorial for Linux

Linux is an open source Operating System. There are many Linux based operating systems. Popular are Ubuntu, Fedora, Linux Mint, Debian. In this section you will learn how to do python installation for both Python 3 and Python 2 versions. Fedora Linux OS used for Installation of python. Most of the newer Linux based Operating system have already installed Python. You will check it is installed or not by the typing the following commands in terminal.

For Python3

$ python3 --version

 

For Python2

$ python2 --version

 

You will see the python versions as output like in the below screenshot. But if you are not seeing then , you have to install Python . Follow the following steps for successful install.

linux python version check

 

Open the terminal or Command prompt from your linux based OS. Type the following commands.

If you are using Ubuntu 16.0 or newer version, then you can easily install Python 3.6 or Python 2.7 by typing the following commands

$ sudo apt-get update

$ sudo apt-get install python3.6

or

 

$ sudo apt-get update

$ sudo apt-get install python2.7

 

Newer Versions of Fedora have pre-installed both the versions of Python. In case , you are using other Linux distribution there is more chance that Python is pre-installed.

Python Installation Tutorial for MacOs

MacOs is an operating system developed by the Apple Inc. It is just like Windows Operating System and other operating system. Most of the newer versions of MacOS have pre-installed python. You can check python is installed or not by the following commands.

python --version

 

Python 3 or Python 2 Major Version Installation

Download the Python 3 or 2 new version. At the time of writing this post , Python 3.6 or Python 2.7 was the newer version. Download the Mac OS X 64-bit/32-bit installer. Run the package and following the installation steps to install the python packages.

Python Releases for Mac OS X Python org (2)
Python Releases for Windows

After the successful installation , you can check the python version by using the same command.

python --version

Anaconda for Python –

Stand alone python is self sufficient for development. We may package manager and install the other dependencies over it. It make the deployment lean. But If you need a bundle of dependencies, you may Installing Anaconda distribution ( specially for Data science).

End Notes

Python Installation on Windows, Linux and MacOS can be a difficult task for beginners. In fact, You have to carefully follow the installation steps for completion. The above steps for the python installation must be followed for successful installing. Otherwise, it may lead error and you will unable to find Python Version when you check on command prompt. I hope this article must have solved your query about how to do python instillation. Anyways Don’t forget to subscribe our blog for latest post on python programming language. Also, You may write suggestions and comment in comment box below . In addition, You may also request new articles , We will enjoy to interact with you.

Thanks

Data Science Learner Team 

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Something went wrong.

Meet Sukesh ( Chief Editor ), a passionate and skilled Python programmer with a deep fascination for data science, NumPy, and Pandas. His journey in the world of coding began as a curious explorer and has evolved into a seasoned data enthusiast.
 
Thank you For sharing.We appreciate your support. Don't Forget to LIKE and FOLLOW our SITE to keep UPDATED with Data Science Learner