Install Python

Summary: in this tutorial, you’ll learn how to install Python on your computer, including Windows, macOS, and Linux.

Install Python on Windows #

Download Python Installer #

Run the installer #

Double-click the installer file to run the installer.

In the installer window:

  • Check Add Python to PATH at the bottom of the window. This ensures you can run the python command line without specifying its full path.
  • Click Install Now to begin the installation.
  • Leave other options as the default.

It’ll take a few minutes to complete the setup.

Verify the installation #

  • Open the Command Prompt by pressing Win + R, type, and press Enter.
  • Check the install Python version using the command: python --version. You should see output indicating the version you install, e.g., Python 3.13.2

If you see the following output from the Command Prompt after typing the python command:

'python' is not recognized as an internal or external command,
operable program or batch file.

It’s likely that you didn’t check the Add Python to PATH checkbox when you installed Python.

Install Python on macOS #

It’s recommended to install Python on macOS using an official installer. Here are the steps:

  • First, download a Python release for macOS.
  • Second, run the installer by double-clicking the installer file.
  • Third, follow the instructions on the screen and click the Next button until the installer completes.

Install Python on Linux #

Before installing Python 3 on your Linux distribution, you check whether Python 3 was already installed by running the following command from the terminal:

python3 --version

If you see a response with the version of Python, then your computer already has Python 3 installed. Otherwise, you can install Python 3 using a package management system.

For example, you can install Python 3.13 on Ubuntu using apt:

sudo apt install python3.13

To install the newer version, you replace 3.13 with that version.

Was this helpful?