Summary: in this tutorial, you’ll learn how to install Python on your computer including Windows, macOS, and Linux.
Install Python on Windows
First, download the latest version of Python from the download page.
Second, double-click the installer file to launch the setup wizard.
In the setup window, you need to check the Add Python 3.8 to PATH and click Install Now to begin the installation.
It’ll take few minutes to complete the setup.
Once the setup completes, you’ll see the following window:
Verify the installation
To verify the installation, you open the Run window and type cmd, and press Enter:
In the Command Prompt, type
python command as follows:
If you see the output like the above screenshot, you’ve successfully installed Python on your computer.
To exit the program, you type Ctrl-Z and press Enter.
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.
Code language: Shell Session (shell)
It’s likely that you didn’t check the Add Python 3.8 to PATH checkbox when you install 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 instruction 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 is already installed by running the following command from the terminal:
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 on Ubuntu using apt:
sudo apt install python3-pil
In this tutorial, you learned how to install Python 3 successfully on your computer.