Python : Installation Guide

Python : Installation Guide

Before diving into the world of Python programming, the first step is to install Python on your computer.

This blog will guide you through the installation process, covering different operating systems and common installation methods.

Installing Python on Window:

  1. Download Python: Visit the official Python website (python.org) and navigate to the Downloads section. Choose the latest Python version compatible with your Windows version (e.g., Python 3.12.3 for Windows 10).

    Link - https://www.python.org/

  1. Run the Installer: Once the download completes, double-click the installer file (e.g., python-3.12.3.exe) to launch the Python installer.

  2. Customize Installation: In the installer, you can customize the installation options. Ensure that the "Add Python to PATH" option is checked, as it allows you to run Python from the command line easily.

  3. Install Python: Click on the "Install Now" button to begin the installation process. Python will be installed in the default location (usually C:\Python).

  4. Verify Installation: After installation, open Command Prompt and type python --version or python -V to check if Python is installed correctly. You should see the installed Python version (e.g., Python 3.12.3).

     python --version
    
     python -V
    

Python 3.12.1

Installing Python on macOS:

  1. Using Homebrew (Recommended): Open Terminal and install Homebrew if you haven't already. Then, run the command brew install python to install Python using Homebrew.

     brew install python
    
  2. Download from Python Website: Alternatively, you can download the macOS installer from python.org. Choose the macOS installer for the desired Python version and follow the on-screen instructions.

  3. Verify Installation: After installation, open Terminal and type python3 --version to verify that Python is installed. You should see the installed Python version (e.g., Python 3.12.3).

     python3 --version
    

Installing Python on Linux (Ubuntu/Debian):

  1. Using Package Manager: Open Terminal and run the command sudo apt update to update package lists. Then, install Python 3 with sudo apt install python3.

     sudo apt update
    
     sudo apt install python3
    
  2. Verify Installation: After installation, type python3 --version in Terminal to check the installed Python version (e.g., Python 3.10.1).

     python3 --version
    

You can support me by buying me a coffee ☕

Did you find this article valuable?

Support Ajay Sharma by becoming a sponsor. Any amount is appreciated!