Code Skiller logoCB Logo
Logo LearnLearnLogo PracticePracticeLogo HireHireLogo IDEIDE

How to Install Python in your System

User image

Published by

sanya sanya

Published at: 19th May, 2023
3.715 mins read

Python is a high-level, interpreted programming language that was first released in 1991 by Guido van Rossum. It is an open-source language, which means that the source code is freely available and can be modified and distributed by anyone. Python's syntax is easy to read and learn, making it an ideal language for beginners to learn programming. Python has numerous libraries and frameworks that make it easy to perform complex tasks. Python is a cross-platform language, which means that it can be run on various operating systems, including Windows, Linux, and MacOS. It has a vast community of developers worldwide, who contribute to its development and support.

Python is a versatile language that is used in a wide range of applications like,

  • Web Development
  • Data Analysis
  • Artificial Intelligence
  • Scientific Computing
  • Game Development
  • Automation
  • Desktop Applications

In this tutorial you can see how to install python in your system (Windows/ Linux/ MacOS)

For Windows

Below are the steps to be followed for download and installation of python in Windows.

  1. Go to the official Python website at https://www.python.org/downloads/ and click on the ‘**Download Python 3.11.3’ below the download the latest version for windows to download the latest version **(The latest version of python as per now is Python 3.11.3).


    alt_text

  2. Choose the appropriate version of Python based on your operating system (Windows) and architecture (32-bit or 64-bit).


    alt_text


  3. Once the download is complete, run the python installer by double-clicking the downloaded file.

  4. In the Python installer, check the box that says "Add Python 3.11.3 to PATH" (where 3.11.3 is the version number).

    Checking this box will add the Python executable to your system's PATH environment variable, which makes it easier to run Python programs from the Command Prompt.

    alt_text

  5. Click on the "Install Now" button to begin the installation process.

  6. Once the installation is complete verify that Python is installed by opening the Command Prompt and typing "python" and hitting Enter.

    This should start the Python interpreter, and you should see the Python version number displayed. Below is the Python Shell, or Python Interpreter. The Python command prompt, which is represented by the three greater-than signs, is where we type our programmes and where, upon pressing the enter key, the results are immediately returned.


    alt_text


That's it! You have successfully downloaded and installed Python on your Windows machine.

For Linux

Follow the below given steps to download and install python in Linux using package manager.

  1. Open the terminal and write the command given below

    $ sudo apt-get update
    $ sudo apt-get install python3
    

    You can also download the specific python version like latest 3.11.3 version by

    $ sudo apt-get install python 3.11.3
    
  2. In terminal you will get an option whether you want to continue the process or not. Enter Y to continue the download and installation of Python in your system.

    alt_text

  3. To verify which version of python is installed open the terminal and run

    $ python3 --version
    
    

That's it! You have successfully downloaded and installed Python on your Linux machine.

For MacOS

Below are the steps to be followed for download and installation of python in MacOS.

  1. Go to the official Python website at https://www.python.org/downloads/.

  2. After selecting the version of Python, click on the "Download Python 3.11.3" button (where 3.11.3 is the version number) for the latest version of Python. You can also select other versions.

  3. Choose the appropriate MacOS installer package based on your operating system version (e.g. MacOS 10.15) and architecture (i.e. Intel or Apple Silicon).

  4. Once the download is complete, double-click on the downloaded package file to run the Python installer. The file is downloaded in .pkg format.

  5. Follow the prompts in the installer, making sure to select the "Install for all users" and "Add Python 3.11.3 to PATH" options.

    alt_text

  6. Once the installation is complete, open the Terminal app by going to Applications > Utilities > Terminal.

  7. Type "python3" (or "python" if you installed Python 2) in the Terminal window and hit Enter. This will start the Python interpreter, and you should see the Python version number displayed.

That's it! You have successfully downloaded and installed Python on your MacOS machine.

Library

WEB DEVELOPMENT

FAANG QUESTIONS

On this page