Where to get Python and what version to choose

Download Python from python.org, the official website run by the Python Software Foundation. The site offers installers for Windows, macOS, and Linux. Most people should download the latest stable version — currently Python 3.12 or 3.13 — rather than older versions or pre-release builds.

Python 2 is no longer maintained and should not be used for new projects. If you see references to Python 2, that documentation is outdated. Stick with Python 3.

The download page shows different installers for different operating systems. Windows users get an .exe file, macOS users get a .pkg file, and Linux users typically install Python through their system package manager rather than downloading an installer directly.

Key Takeaways

  • Download Python from python.org, not from third-party sites, to avoid bundled software or outdated versions.
  • Windows and macOS installers walk you through setup step-by-step; Linux users typically use their system's package manager instead.
  • During Windows installation, check the box that says "Add Python to PATH" so you can run Python from the command line.
  • After installation, open your terminal or command prompt and type python --version to confirm Python installed correctly.

Installing Python on Windows

Go to python.org, click the Downloads tab, and select the Windows installer. The site detects your system and offers the right version automatically. Download the executable file (.exe).

Run the installer. A window appears with setup options. Check the box labeled "Add Python to PATH" before clicking Install. This step matters — it lets you run Python from the command prompt or PowerShell without typing the full file path each time. If you skip this, you will have to add it manually later.

The installer copies Python files to your computer, usually to C:\Users\[YourUsername]\AppData\Local\Programs\Python\Python313 or similar. You can accept the default location unless you have a specific reason to change it.

After installation finishes, open Command Prompt or PowerShell and type python --version. If Python installed correctly, you will see the version number printed back to you.

Installing Python on macOS

Download the macOS installer from python.org. The site offers both Intel and Apple Silicon (M1/M2/M3) versions. Choose the one that matches your Mac's processor. If you are unsure, click the Apple menu, select About This Mac, and look under Chip.

Double-click the .pkg file to start the installer. Follow the prompts through the setup wizard. The installer places Python in /Library/Frameworks/Python.framework by default. You do not need to change this location.

Open Terminal (find it in Applications > Utilities) and type python3 --version. Note that macOS uses python3, not python, because the system reserves python for its own older version. You will use python3 to run your scripts on macOS.

Installing Python on Linux

Most Linux distributions come with Python already installed. Open a terminal and type python3 --version to check. If Python is present, you can skip installation.

If you need to install or update Python, use your system's package manager rather than downloading from python.org. On Ubuntu and Debian, type sudo apt update followed by sudo apt install python3. On Fedora, use sudo dnf install python3. On Arch, use sudo pacman -S python.

After installation, verify it worked by typing python3 --version in the terminal.

Checking that Python works after installation

The simplest test is the version command you ran above. If that printed a version number, Python is installed and your system can find it.

For a more complete test, open your terminal or command prompt and type python (or python3 on macOS and Linux). You should see a prompt that looks like >>>. Type print("Hello") and press Enter. Python should print Hello back to you. Type exit() to leave this interactive mode.

If you get a "command not found" error, Python either did not install or is not in your PATH. On Windows, re-run the installer and make sure you checked "Add Python to PATH". On macOS or Linux, check that you used python3, not python.

What to do if installation fails or Python will not run

On Windows, the most common problem is skipping the "Add Python to PATH" step. You can fix this without reinstalling: open Control Panel, search for "Environment Variables", click "Edit the system environment variables", then click "Environment Variables" at the bottom. Under System variables, find PATH, click Edit, and add the folder where Python is installed (usually C:\Users\[YourUsername]\AppData\Local\Programs\Python\Python313). Click OK on each window and restart your terminal.

On macOS, if python3 --version does not work but you just installed Python, restart Terminal or open a new Terminal window. Sometimes the system does not recognize the new installation until you start a fresh session.

On Linux, make sure you ran sudo apt update before sudo apt install python3. If the package manager says Python is already installed but you cannot find it, type which python3 to see where it is located.

Next steps after downloading Python

Once Python runs, you can write and run scripts. Create a text file with a .py extension (for example, hello.py, containing print("Hello, World")), save it, then run it from your terminal by typing python hello.py (or python3 hello.py on macOS and Linux).

Most people also install a code editor or IDE to make writing Python easier. Popular free options include Visual Studio Code, PyCharm Community Edition, and IDLE (which comes with Python). These tools highlight syntax errors, suggest completions, and let you run code directly from the editor.

Frequently Asked Questions

Do I need to download Python if I already have it installed?

Check by typing python --version or python3 --version in your terminal or command prompt. If a version number appears, Python is already there. You only need to download if you want a newer version or if Python is not installed at all.

What is the difference between Python 3.12 and Python 3.13?

Python 3.13 is newer and includes performance improvements and new features. For most beginners, either version works fine. If you are starting fresh, choose the latest version. If you are working on an existing project, check whether it specifies a particular Python version in its documentation.

Can I have multiple versions of Python installed at the same time?

Yes. Windows and macOS installers can coexist without conflict. On Windows, you can run a specific version by typing the full path or by using the Python launcher. On macOS and Linux, you run different versions by typing python3.12 or python3.13 instead of just python3.

Why does macOS use python3 instead of python?

macOS includes an old version of Python 2 under the name python for system compatibility. To avoid confusion and conflicts, the newer Python 3 installer uses the name python3. Always use python3 on macOS unless you have a specific reason to use the system Python.

Is it safe to download Python from python.org?

Yes. python.org is the official website maintained by the Python Software Foundation, a nonprofit organization. Downloading from anywhere else risks getting outdated versions, bundled software you did not ask for, or modified versions. Always use python.org.