Python

Download & Install Python for Windows, MacOS and Linux

Downloading and Installing Python is a straightforward process, and the steps vary slightly depending on the operating system you’re using. Below are step-by-step tutorials for downloading and installing Python on Windows, macOS, and Linux.

Windows

Step 1: Download Python Installer

  1. Go to the official Python website.
  2. Click on the version you want to download. For most people, downloading the latest version is the best option.

Step 2: Run the Installer

  1. Locate the installer file, usually found in the ‘Downloads’ folder.
  2. Double-click the installer to launch it.
  3. Make sure to check the box that says “Add Python to PATH” at the bottom of the installation window.
  4. Click on “Install Now”.

Step 3: Verify Installation

  1. Open Command Prompt.
  2. Type python --version and press Enter. If installed successfully, it will display the Python version.

Step 4: Launch Python

Method 1: Using Command Prompt

  1. Open the Command Prompt by searching for cmd in the Start menu or pressing Win + R and typing cmd.
  2. Once the Command Prompt is open, type python and press Enter.

Method 2: Using Python IDLE

  1. Search for IDLE or Python IDLE in the Start menu.
  2. Click on it to open the IDLE interface, which is an environment where you can write and execute Python code.

macOS

Step 1: Download Python Installer

  1. Visit the Python downloads page for macOS.
  2. Download the installer package for the latest Python version.

Step 2: Run the Installer

  1. Locate the .pkg file in your ‘Downloads’ folder.
  2. Double-click it to start the installation process.
  3. Follow the on-screen instructions.

Step 3: Verify Installation

  1. Open Terminal.
  2. Type python3 --version and press Enter. The Python version should display.

Step 4: Launch Python

Method 1: Using Terminal

  1. Open the Terminal application. You can find it in the Utilities folder within the Applications folder.
  2. Type python3 and press Enter.

Method 2: Using Python IDLE

  1. Open Finder and go to the Applications folder.
  2. Navigate to the Python folder (usually labeled with the Python version, e.g., Python 3.9).
  3. Double-click on the IDLE application.

Linux

Step 1: Update Package List (For Debian/Ubuntu)

  1. Open a terminal window.
  2. Run sudo apt update.

Step 2: Install Python

  • For Debian/Ubuntu: sudo apt install python3
  • For Fedora: sudo dnf install python3

Step 3: Verify Installation

  1. In the terminal, type python3 --version and press Enter. The Python version should display.

Step 4: Launch Python

Method 1: Using Terminal

  1. Open a terminal window.
  2. Type python3 and press Enter.

Post-Installation

After installing Python, you may want to install additional packages. This can usually be done using Python’s package manager, pip, by typing pip install package-name in the terminal (or pip3 for Python 3.x on macOS and Linux).

That’s it! You should now have Python installed on your system.