Technology and Marketing Insights

How to Install Python on Windows & Linux

Python is a very fast-growing programming language because the best thing about python is that it is easy to code and understand. To learn python you don’t have to invest a lot of money or time. You just need a proper guide like any website or video tutorial. But the important thing is to practice it and for that, you will require a python compiler or Python IDE (Integrated Development Environment). There are many IDE’s available online you can use any but the best one is the original Python IDE. So if you want to learn python then you must Install python IDE first, So here are few steps which you should follow and you are good to go.

In this tutorial, you will get all details about how to install python on windows OS, Linux OS and if you are using any other OS than the same steps will work for it too. Just follow steps properly and if you face any problems please comment down so we will help you out in that.

How to Install Python on Windows?

There are different methods of installing Python on Windows. Here we will explain you a few methods, but if you already have Python on your system then check out the Python version.

First, let us check out how to check the Python version on windows.

To check the Python version, you need to open PowerShell.

  • Right-click on start button and select Windows PowerShell, OR press the windows key and type Powershell.
  • Open it and type the following command:
C:\> python --version
  • Press enter and it will show you the version of Python that is installed on your device.

Now, let us check out the installation process of Python on Windows.

Methods to install Python on Windows

If you are a beginner and want to focus on learning the language instead of building software, then you must install it from Microsoft Store Package. It is the shortest and easiest path to get started without any worries.

However, if you are an experienced developer who wants to develop software in Windows, then you must go for the official Python.org installer. Here, you can control the executables and can also add Python to PATH if required.

Method 1: Install from Microsoft Store

  1. Firstly, open the Microsoft Store app and type Python in the search bar.
  2. You will see multiple results, from which you have to select Python 3.8 or above version
  3. Once you select the version, click on Get.
  4. The app will start getting downloaded, and once it is finished, you will see an option of Install on my devices.
  5. Click on it and select the device where you want to complete the installation.
  6. Click on install now.
  7. After the installation is completed, you will see a message “this product is installed” at the top of the Microsoft store page.

That’s it! You have successfully downloaded Python including pip and IDLE on windows.

NOTE: Whenever you select the Python version from the results, you must check the developer should be Python Software Foundation. And the other thing which should be kept in mind is the app is free to download, so if any app asks you for money, then you have selected the wrong application.

Method 2: Install Python From the Full Installer

If you are a professional developer who wants a full-featured Python, can install it from Full Installer. With this, you get more options to customize and control.

  1. Open any browser and enter Python.org or go to Download Page for Windows
  2. Under “Python Releases for windows” click on Latest Python 3 Release-Python 3.x.x.
  3. Scroll down and select Windows x86-64 executable installer for 64-bit or Windows x86 executable installer for 32-bit.
  4. When the installer is downloaded, double click on the file and run it.
  5. A dialog box will appear as shown below.

Install python on windows

These are the four things to know about this dialog box:

  • The default install path is in the AppData / Directory of the Windows user.
  • Customize installation button is used to customize the installation location and it has more features installed like pip and IDLE.
  • The install launcher checkbox is checked by default. All the users on the system will have access to the py.exe launcher
  • Add Python 3.8 to PATH checkbox is unchecked by default.

That’s it! You have installed the latest version of Python on your device.

NOTE: If you don’t have any knowledge of PATH then do no install it with the full installer. Instead of that use Microsoft Store Package.

How to Install Python on Linux?

Installing Python on Linux also has different methods, which are explained below. Before checking the installation process, first, let us check out how to check the Python version on your system.

How to Check Your Python Version on Linux?

There are many Linux deals that come with packaged with Python, but it is not the latest version. So, it is better to check the version of Python.

Find out which version is there in your system by following commands.

  • First, open a terminal window on Linux and enter the following commands:
# Check the system Python version
$ python --version
$ python3 --version
Python 3.6.10

Methods to install Python on Linux

Method 1: Install on Ubuntu and Linux Mint

Here we will explain to you how to install Python by using Ubuntu’s apt package manager. It depends on which version of Ubuntu distribution is running on your system. Discover your local Ubuntu version by entering the following command:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial

Follow the below steps that match the version number that is seen under RELEASE in the output:

On Ubuntu 18.04 and above, Python 3.8 does not come by default. But it is available in the Universe repository. So, you need to install Python 3.8 version and to do that, open a terminal app and type the given commands:

$ sudo apt-get update
$ sudo apt-get install python3.8 python3-pip

Once it is installed, you can run Python3.8.

If you are using Linux Mint and Ubuntu 17 or below, then you need to get the Universe repository from a Personal Package Archive.

Method 2: Build Python From Source Code on Linux

Sometimes, Linux distribution does not have the latest version of Python, so here are the steps to build Python from source code:

Download Source Code

Firstly, you need to download the Source Code. Visit Python.org or go to Downloads Page. At the top, you will see the latest source for Python 3. Select it and see a “Files” section at the bottom of the page. From there select Gzipped source tarball and download it. If you want to use a command-line method, then you can use wget

$ wget https://www.python.org/ftp/python/3.8.4/Python-3.8.4.tgz

Now, Prepare a system to build Python.

  • First, you need to update your package manager and upgrade the packages.
  • Next, make sure all the build requirements are installed

Build Python

  • Once, the TAR file and prerequisites, you can build python. The following command will create a new directory called Python-3.8.3
$ tar xvf Python-3.8.4.tgz
$ cd Python-3.8.4
  •  run the ./configure a tool to prepare the build
  • Build Python by using make
  • Finally, install the new version of Python

Verify Installation

Check the --version command is the latest version or not.

Conclusion

By following the given methods, you can successfully download and install Python on Windows or Linux. These are a few of the best and easiest methods to do so. We hope this article was helpful to you.

Leave A Reply

Your email address will not be published.