Setup · Python

10 minutes. No signup.

Home › Courses › Python › Setup
🛠️ Setup Guide · 2026

Install Python 3.
10 minutes, one time.

Install Python 3 on Windows, Mac, or Linux. Verify pip. Create a virtual environment. This guide covers the exact steps and the 7 most common errors that stop people at the first terminal command.

~10 minutes All platforms Python 3.12+
Before you start Install steps Virtual env 7 errors Verify FAQ

To install Python 3: go to python.org/downloads;, run the installer for your OS, and check "Add Python to PATH" on Windows before clicking Install. Then verify with python --version in your terminal. If that shows an error, PATH isn't set and everything after this will fail. The install takes 10 minutes once; the PATH mistake costs hours if you miss it.

Who this is for: first-time Python installers, or anyone reinstalling after a "python is not recognized" error. Skip if: you already have Python 3.10+ running and pip working.

✅ Before you start

Two things to know before you download anything.

You need:

  • A computer running Windows 10+, macOS 11+, or any modern Linux distro
  • ~150 MB free disk space
  • Admin access on Windows (the installer needs it)
  • Terminal or Command Prompt open — you'll use it to verify the install

Python 2 is dead. Do not install Python 2. It reached end-of-life in January 2020 and is no longer receiving security updates. Any tutorial, book, or video teaching Python 2 is outdated — close the tab. This guide and every page on this site teaches Python 3 exclusively.

🖥️ Install steps

Pick your OS. The steps are the same shape but the installer differs.

1

Download the installer

Go to python.org/downloads; and click the big yellow "Download Python 3.x.x" button. It auto-detects Windows and serves the correct 64-bit installer.

2

Check "Add Python to PATH" — the critical step

Run the installer. On the very first screen, check the box that says "Add Python 3.x to PATH" at the bottom. This is the single most important checkbox in the entire install. Without it, typing python in Command Prompt shows "not recognized" — and every tutorial that follows will fail.

Already clicked Install without checking it? Don't reinstall. See error #1 below — it takes 30 seconds to fix via System Properties.

3

Click "Install Now" and wait

The default installation is fine for 99% of users. Don't click "Customize installation" unless you specifically need to change the install location. The install takes 1–3 minutes.

4

Verify the install

Open Command Prompt (press Win + R, type cmd, press Enter) and run:

Command Prompt
python --version
Python 3.12.4

pip --version
pip 24.0 from C:\Users\you\AppData... (python 3.12)

If you see a Python version number, the install worked. If you see 'python' is not recognized, jump to error #1.

1

Download the macOS installer

Go to python.org/downloads; and click the "Download Python 3.x.x" button. On macOS you get a .pkg universal2 installer that works on both Intel and Apple Silicon.

2

Run the .pkg and follow the prompts

Double-click the downloaded .pkg, click Continue, Continue, Agree, Install. It will ask for your Mac password — this is normal (it installs into system paths). The install takes about 30 seconds.

3

Verify — note it's python3, not python

Open Terminal (Cmd + Space, type "Terminal", Enter) and run:

Terminal
python3 --version
Python 3.12.4

pip3 --version
pip 24.0 from /Library/Frameworks/Python.framework/... (python 3.12)

macOS ships with an old Python 2 at /usr/bin/python that it uses internally. Python 3 is always installed as python3. Use python3 and pip3 from now on.

4

Optional — make python point to python3

If typing python3 all the time is annoying, add an alias to your shell profile:

Terminal
# For zsh (default on modern macOS)
echo 'alias python=python3' >> ~/.zshrc
source ~/.zshrc

# For bash
echo 'alias python=python3' >> ~/.bash_profile
source ~/.bash_profile
1

Check what's already installed

Most Linux distros ship with Python 3 preinstalled. Check first:

Terminal
python3 --version
Python 3.11.6

If you see 3.10 or higher, you're done with the basics. Skip to step 3.

2

Install or upgrade via your package manager

Terminal
# Debian / Ubuntu
sudo apt update && sudo apt install python3 python3-pip python3-venv

# Fedora / RHEL
sudo dnf install python3 python3-pip

# Arch
sudo pacman -S python python-pip

Install python3-venv separately — it's often not bundled with the base Python package on Debian/Ubuntu.

3

Verify

Terminal
python3 --version
Python 3.12.3

pip3 --version
pip 24.0 from /usr/lib/python3/dist-packages/pip (python 3.12)

🧪 Create a virtual environment

Do this once per project. Never install packages globally.

Every project should have its own virtual environment. It's a folder that contains its own Python interpreter and its own copy of installed packages. Without one, project A and project B share the same packages — and when project A needs version 1.0 of a library while project B needs version 2.0, everything breaks.

1

Create the project folder and cd into it

Terminal
mkdir my-project
cd my-project
2

Create the virtual environment

Terminal
# On Mac / Linux
python3 -m venv venv

# On Windows
python -m venv venv

This creates a folder called venv/ inside your project. That folder contains a complete Python environment. It's already gitignored by convention.

3

Activate it

Terminal
# Mac / Linux
source venv/bin/activate

# Windows (Command Prompt)
venv\Scripts\activate

# Windows (PowerShell)
.\venv\Scripts\Activate.ps1

You'll see (venv) appear at the start of your prompt. That's how you know it's active. Every pip install from now on installs into this project, not the system.

4

Deactivate when done

Terminal
deactivate

Every project needs its own venv. Not one per machine. The whole point is isolation between projects. If you're working on two Python projects, you have two venvs and you activate the right one before working on each.

🚨 The 7 errors that stop installs

Each of these has a one-command or one-click fix.

1. 'python' is not recognized as an internal or external command

Windows. You didn't check "Add Python to PATH" during install. Fix without reinstalling:

Press Win, type "Environment Variables", open "Edit the system environment variables" → "Environment Variables" → under "User variables" select Path → Edit → New → paste the Python path (usually C:\Users\you\AppData\Local\Programs\Python\Python312 and ...\Python312\Scripts). Click OK on all windows. Close and reopen Command Prompt.

2. 'python' opens the Microsoft Store on Windows

Windows. Windows 10/11 ships with a fake "python" stub that redirects to the Microsoft Store. Fix: Settings → Apps → Advanced app settings → App execution aliases → turn off "App Installer (python.exe)" and "App Installer (python3.exe)". Now your real Python install will be found.

3. 'pip' is not recognized as an internal or external command

Any OS. pip isn't on your PATH, or isn't installed. Fix: run python -m ensurepip --upgrade. If that works, use python -m pip install ... instead of pip install ... until the PATH is fixed. On Windows, the Python Scripts folder must be on PATH for pip to work as a bare command.

4. Permission denied: '/usr/bin/python3'

Mac / Linux. You're trying to install a package into the system Python. Never use sudo pip. It breaks the system Python and can't be cleanly undone. The fix is a virtual environment: create one (python3 -m venv venv), activate it, then pip install works without sudo.

5. SSL certificate errors during pip install

Corporate Windows / Mac behind a proxy. pip can't verify PyPI's SSL cert because of an intercepting proxy. Fix: configure pip to use the proxy certificate: pip config set global.cert /path/to/cert.pem. Do NOT use --trusted-host — it disables SSL verification entirely and is a security risk.

6. "Python was not found" but you definitely installed it

Any OS. Two installs of Python are conflicting. On Windows, check if where python returns multiple paths — the wrong one is being picked up first. Fix: reorder the PATH entries so the newest install is at the top. On Mac/Linux, check which -a python3 and adjust the shell profile.

7. venv creation fails with "ensurepip is not available"

Debian / Ubuntu. The system Python doesn't include venv by default. Fix: sudo apt install python3-venv. This is why step 2 of the Linux install explicitly includes python3-venv — most people don't know it's a separate package.

✔️ Final verification

Run these five commands. If all five succeed, your Python is ready.

Terminal
# 1. Python is installed and on PATH
python3 --version
Python 3.12.4

# 2. pip is installed and on PATH
pip3 --version
pip 24.0 ... (python 3.12)

# 3. Python can run code
python3 -c "print('hello')"
hello

# 4. venv module works
python3 -m venv testenv
rm -rf testenv

# 5. pip can reach PyPI
pip3 install --upgrade pip
Successfully installed pip-24.x.x

You're ready if:

  • python3 --version (or python --version on Windows) prints 3.10 or higher
  • pip --version prints a pip version
  • python3 -c "print('hello')" prints hello
  • python3 -m venv doesn't error
  • pip can install a package (any package — try pip install requests)

🚀 What's next

Python is installed. Now write your first script.

❓ Frequently asked questions

What is the latest version of Python?

As of October 2026, Python 3.13 is the latest stable release, with 3.12 still widely used. Install 3.12 or newer — 3.11 is the oldest version still receiving security updates. Never install Python 2 — it reached end-of-life in January 2020.

Why does 'python' not work but 'python3' does on Mac?

macOS ships with Python 2 at /usr/bin/python (deprecated). When you install Python 3, it's added as 'python3' to avoid overwriting the system Python. Use 'python3' and 'pip3' on Mac. Or add an alias in your shell profile: alias python=python3.

What does 'Add Python to PATH' do?

It adds the Python install directory to your system PATH environment variable. Without it, typing 'python' in Command Prompt shows 'not recognized'. You can either re-run the installer and check the box, or add the path manually via System Properties → Environment Variables.

Do I need pip separately from Python?

No. pip comes bundled with Python 3.4 and later. If 'pip --version' fails, run 'python -m ensurepip --upgrade' to install it. On some Linux distros you may need 'sudo apt install python3-pip' separately.

What is a virtual environment and do I need one?

A virtual environment is an isolated folder containing its own Python interpreter and packages. You need one for any project that installs third-party packages — otherwise package versions conflict across projects. Create with 'python -m venv venv' and activate before installing anything with pip.

How do I uninstall Python cleanly?

Windows: Settings → Apps → Python → Uninstall, then delete leftover folders in AppData. Mac: delete /Library/Frameworks/Python.framework and /usr/local/bin/python3 symlinks. Linux: use your package manager ('sudo apt remove python3'). Never delete system Python on Mac or Linux.

Why is 'pip install' giving a 'permission denied' error?

You're installing into the system Python, which is protected. The fix is a virtual environment: run 'python -m venv venv', activate it, then 'pip install' works. Avoid 'sudo pip install' — it damages the system Python and is a security risk.

Can I have multiple Python versions installed?

Yes, but managing them manually gets confusing. Use pyenv (Mac/Linux) or pyenv-win (Windows) to install and switch between versions cleanly. Each version stays isolated and you can set a project-specific default with 'pyenv local 3.12.0'.

🌐 External resources

← Back to Python track
You're in the Python track · Setup