Python Installation Guide for Windows, macOS, and Linux
Get Python 3.13 installed and verified on any operating system in under 10 minutes — with the right settings from the start and the most common mistakes covered.
This Python installation guide covers Windows, macOS, and Linux. Python is free and the installation takes under ten minutes when done correctly. The two most common beginner mistakes are installing Python 2 by accident or skipping the PATH configuration on Windows. Both mistakes produce the same symptom: your terminal refuses to recognize the python command. The fixes differ by cause.
Download Python from python.org
The only recommended download source for Python is python.org. System-bundled versions, unofficial App Store distributions, and some third-party package managers include older or non-standard Python builds that cause compatibility problems later.
Navigate to python.org/downloads. The page automatically detects your operating system and shows the recommended installer at the top. In 2026, that installer is for Python 3.13.x, the current stable release. Click the large download button, which saves a platform-appropriate installer to your Downloads folder.
One universal rule: never install Python 2. Python 2 reached end-of-life in January 2020 and has received zero security patches since then. The internet contains many old tutorials that target Python 2, but every modern project, framework, and library requires Python 3. If a guide tells you to install Python 2, find a different guide.
If you are curious why Python 2 was retired and why the 3.x branch was a deliberate clean break, who created Python and how the language evolved covers the full design history.
Installing Python on Windows
Locate the installer you downloaded from python.org. It is an .exe file named something like python-3.13.x-amd64.exe. Double-click it to open the setup wizard.
The first screen of the installer is the most important step in this entire guide. At the bottom of that screen, you will see a checkbox labeled "Add Python 3.x to PATH." Check that box before you do anything else. Without it, your terminal cannot find Python after installation, and you will see the error "python is not recognized as an internal or external command." Fixing this after the fact requires uninstalling and reinstalling Python from scratch.
After checking that PATH option, click "Install Now." The installer copies Python to your user directory, registers it with Windows, and sets up the command-line tools automatically. The whole process takes about two minutes.
When installation completes, open a Command Prompt window by pressing the Windows key, typing cmd, and pressing Enter. Type the command to check your Python version. If you see a version number in the output, the installation succeeded.
A note on the Windows Python Launcher: Python 3 installations from python.org also place a utility called the Python Launcher on your system. This launcher lets you run specific Python versions on machines that have multiple versions installed. You can invoke it with the two-letter command py, followed by a version flag like py -3.13. For most beginners with a single Python installation, this is not necessary. But it is useful to know it exists.
Installing Python on macOS
macOS includes a system Python, but this bundled version is either Python 2 (on older macOS releases) or an incomplete Python 3 from the Xcode Command Line Tools on newer ones. Do not use the system Python for development. It exists for Apple's internal tools and is not updated by Apple for general programming use.
Download the macOS installer from python.org (a .pkg file) and double-click it to follow the installation prompts. The installer adds Python 3 to your Applications folder and updates your shell environment so the python3 command becomes available in Terminal. No manual PATH configuration is needed.
After the installer finishes, open Terminal (Applications → Utilities → Terminal) and proceed to the verification section below to confirm the installation.
Homebrew alternative: If you already use Homebrew, the popular macOS package manager, you can install Python through it rather than using the python.org pkg. The Homebrew formula provides a valid Python 3 installation and makes updating easier. For beginners who have never used Homebrew, the python.org installer is the simpler path.
Important command note: On macOS, the bare python command may still point to the old system Python 2. Always use the python3 command explicitly on macOS. If python3 is not found after installation, restart Terminal to reload your shell environment.
Installing Python on Linux
Most modern Linux distributions ship with Python 3 pre-installed. Ubuntu 22.04 LTS and later versions include Python 3.10 or newer by default. Before downloading anything, open Terminal and check what is already on your system. Run the version check command shown in the verification section below.
If your system has Python 3.12 or 3.13, you are ready to proceed and do not need to install anything. If Python 3 is absent or the version is older than 3.10, install it through your distribution's package manager.
On Ubuntu and Debian-based systems, use apt: run sudo apt update first to refresh the package lists, then run sudo apt install python3 python3-pip to install both Python and its package manager. On Fedora and RHEL-based systems, use dnf: run sudo dnf install python3 python3-pip.
The Python versions available through apt and dnf typically trail the latest python.org release by one minor version. This is acceptable for most beginner projects. If you specifically need the latest release, pyenv (a Python version manager) lets you install any Python version without root access and switch between them per project.
Verify Your Installation
After installing Python on any platform, open a terminal and run the following commands to confirm everything is working:
# Windows. Open Command Prompt and run:
python --version
# macOS and Linux. Open Terminal and run:
python3 --version
# Verify pip on all platforms (try both if one fails):
pip3 --version
pip --versionA successful installation shows output like Python 3.13.2 and pip 24.x or later. If you see a version number, Python is installed and on your system's PATH correctly. If you see an error, return to the installation steps for your platform and check that the PATH option was configured.
Once the version commands succeed, confirm that Python responds to code by opening the interactive interpreter. Run python3 on macOS and Linux, or python on Windows, to start the session, then enter these lines one at a time:
>>> print("Python is installed!")
Python is installed!
>>> 2 + 2
4
>>> import sys
>>> sys.version
'3.13.2 ...'If the interpreter starts, accepts your input, and prints responses, Python is fully working. Type exit() or press Ctrl+D (Ctrl+Z on Windows) to close the session.
pip: Python's Package Manager
pip is Python's built-in package manager. It downloads and installs third-party libraries from the Python Package Index. It is included automatically with Python 3.4+ installations from python.org. On Linux systems where you installed Python through apt or dnf, you may need to install the python3-pip package separately if it was not pulled in automatically.
You use pip to add libraries to your Python environment. The most important rule for beginners: never install packages directly into your global Python installation. When you install packages globally, different projects can end up requiring conflicting versions of the same library, and untangling those conflicts is time-consuming. The solution is virtual environments.
A virtual environment is an isolated copy of Python that belongs to one project. Packages installed inside it stay separate from every other project. Creating one takes a single command:
# Create a virtual environment named myenv in the current directory:
python3 -m venv myenv
# Activate the environment. MacOS and Linux:
source myenv/bin/activate
# Activate the environment. Windows (Command Prompt):
myenv\Scripts\activateAfter activation, your terminal prompt changes to show the environment name, confirming that any package you install goes into that environment only. Run pip install followed by a package name to add it. A dedicated tutorial covers virtual environments in detail, including deactivation, deletion, and requirements files. For now, the rule is simple: create a virtual environment for every new project before you install anything.
Rune AI
Key Insights
- Download Python from python.org. Specifically Python 3.13.x. Never install Python 2, which has been end-of-life since January 2020.
- On Windows: the "Add Python 3.x to PATH" checkbox on the installer's first screen is the most critical step. Skipping it is the most common beginner mistake and requires a full reinstall to fix.
- On macOS: do not use the system Python that ships with macOS. Install from python.org and use the python3 command in Terminal.
- On Linux: check whether Python 3 is already installed before installing anything. Most modern distributions include it.
- Always create a virtual environment for each new project before installing packages with pip. This prevents dependency conflicts between projects.
Frequently Asked Questions
What Python version should I install in 2026?
Why do I see "python is not recognized" on Windows?
What is the difference between the python and python3 commands?
Can I install Python without administrator or root access?
I installed Python but the pip command is not found. How do I fix this?
Conclusion
Installing Python correctly from the start saves hours of frustrating debugging later. The essential steps are the same on every platform: download from python.org, pick Python 3.13.x, configure PATH on Windows, verify the version in a terminal, and create a virtual environment before installing any package. Once those steps are done, your machine is ready for every Python tutorial, framework, and project that follows. If you are still deciding whether the investment is worth it, our overview of what Python is and why it dominates 2026 explains where the language fits across AI, web, and data work.
More in this topic
Python Dictionary Comprehensions Explained with Examples
A practical beginner guide to Python dictionary comprehensions. Learn the syntax, the filter clause, the inversion pattern, and when to reach for a regular loop instead.
Python List Comprehensions Explained Step by Step
A step by step beginner guide to Python list comprehensions. Learn the shape, the filter clause, the nested form, and when to reach for a regular loop instead.
Python *args and **kwargs Explained the Easy Way
A clear beginner guide to Python *args and **kwargs. Learn what the stars do, how to use both in function signatures, and the patterns that make flexible functions readable.