Installing Python on Your Computer

Back to Home Page


What is Python?

Python is a programming language that's great for beginners. It's used by scientists, game developers, web programmers, and many others. In this guide, I'll help you install Python on your computer so you can start coding! Message me on the course Canvas page if you have any trouble, and I will be happy to help.


Windows Installation

The Standard Way

  1. Go to the official Python download page
  2. Click the big yellow button that says "Download Python" (it will show the latest version)
  3. IMPORTANT: On the first installation screen, check the box that says "Add Python to PATH" before clicking "Install Now"
  4. Wait for the installation to finish
  5. To test if Python installed correctly:
    1. Press the Windows key + R to open the Run dialog
    2. Type "cmd" and press Enter to open Command Prompt
    3. Type "python --version" and press Enter
    4. You should see the Python version number (like "Python 3.11.4")

What is PATH? The PATH is a list of places where your computer looks for programs. By adding Python to PATH, you can run Python from any folder on your computer just by typing "python" in the command line.


Mac Installation

  1. Go to the official Python download page
  2. Click the yellow button to download the macOS installer
  3. Open the downloaded file (it will be a .pkg file)
  4. Follow the installation steps in the installer
  5. To test if Python installed correctly:
    1. Open the Terminal app (you can find it in Applications → Utilities → Terminal)
    2. Type "python3 --version" and press Enter
    3. You should see the Python version number

On Mac, Python 2 might already be installed, but we want to use Python 3. That's why we use the command "python3" instead of just "python".


Linux Installation

Many Linux distributions come with Python already installed. To check if you have Python:

  1. Open a terminal window
  2. Type "python3 --version" and press Enter
  3. If you see a version number, Python is already installed!

If Python isn't installed, you can install it using your distribution's package manager:

Ubuntu or Debian:

    sudo apt update
    sudo apt install python3
    

Fedora:

    sudo dnf install python3
    

Troubleshooting

"Python is not recognized as an internal or external command"

This error means Python isn't in your PATH. If you see this on Windows:

  1. Try reinstalling Python and make sure to check "Add Python to PATH"
  2. Or install Python using Chocolatey which automatically adds Python to PATH

"Permission denied" on Mac or Linux

Try adding "sudo" before the installation command, like "sudo apt install python3"


What's Next?

Now that you have Python installed, check out our Running Your First Python Program guide!


Back to Home Page