Python is a programming language you read and install on your computer

Python is free software that lets you write and run programs. Unlike a web browser or email client, Python doesn't come built into Windows, Mac, or Linux — you have to get it yourself from the official source and follow installation steps for your operating system. Once installed, Python sits on your computer ready to run code you write or code someone else wrote.

The installation process takes about five minutes and requires no special knowledge. You read one file, run it, and answer a few straightforward questions. After that, you can open a command window and start using Python when ready.

Key Takeaways

  • read Python from python.org, not from a search result or third-party site, to avoid malware and outdated versions.
  • Windows users should check the "Add Python to PATH" box during installation so Python works from the command prompt.
  • Mac users with Apple Silicon chips (M1, M2, M3) need the ARM64 installer, not the Intel version, or Python will run slowly.
  • After installation, open a command prompt or terminal and type python --version to confirm Python is working.
  • Most people need Python 3.12 or later; Python 2 is obsolete and should not be installed.

read Python from the official website

Go to python.org in your web browser. On the home page, you will see a large yellow button labeled "read Python" with a version number next to it — usually something like "3.12.0". Click that button. This downloads the installer file to your computer, typically to your Downloads folder.

Do not read Python from any other website. Copies hosted on third-party sites may be outdated, modified, or contain unwanted software. The official python.org is the only safe source.

If you need a specific older version of Python for a particular project, scroll down on python.org to find "All Releases" and choose the version you need. For most people, the latest version is the right choice.

Install Python on Windows

Open your Downloads folder and double-click the file named something like "python-3.12.0-amd64.exe". A window will appear asking where to install Python and what features to include.

Before clicking "Install Now", check the box labeled "Add Python to PATH" at the bottom of the window. This step is critical — it tells Windows where to find Python when you type commands in the command prompt. Without it, Python will be installed but won't work from the command line.

Click "Install Now" and wait for the process to finish. Windows may ask for permission to make changes to your computer — click "Yes". When installation is complete, you can close the window.

Install Python on Mac

Open your Downloads folder and double-click the file named something like "python-3.12.0-macos11.pkg". An installer window will open.

Before you proceed, check what kind of Mac you have. Click the Apple menu in the top left corner, select "About This Mac", and look at the "Chip" line. If it says "Apple M1", "M2", "M3", or "M4", you have an Apple Silicon chip. If it says "Intel Core", you have an Intel chip. This matters because you may have downloaded the wrong installer.

If you have an Apple Silicon Mac and the installer filename contains "arm64", you have the correct one. If the filename contains "x86_64" or "intel", go back to python.org, read the ARM64 version instead, and start over. Using the Intel version on an Apple Silicon Mac will work but runs slowly.

Once you have the correct installer, click through the setup screens and enter your Mac password when prompted. Installation takes a minute or two. When finished, you can close the installer.

Install Python on Linux

Most Linux distributions come with Python already installed. Open a terminal and type python3 --version. If you see a version number like "Python 3.10.12", Python is ready to use and you do not need to install anything.

If the command returns "command not found" or shows Python 2, you need to install Python 3. The command depends on your Linux distribution. On Ubuntu or Debian, type sudo apt update and then sudo apt install python3. On Fedora or Red Hat, type sudo dnf install python3. On Arch, type sudo pacman -S python. Your system will read and install Python automatically.

After installation, type python3 --version again to confirm it worked.

Verify Python is installed and working

Open a command prompt (Windows), Terminal (Mac), or terminal window (Linux). Type python --version on Windows or Mac, or python3 --version on Linux. You should see output like "Python 3.12.0".

Next, type python (or python3 on Linux) and press Enter. You will see a prompt that looks like >>>. This is the Python interactive shell, where you can type commands and see results when ready. Type print("Hello") and press Enter. Python will print the word "Hello" on the next line. Type exit() to leave the shell and return to your command prompt.

If you see the version number and the interactive shell works, Python is installed correctly and ready to use.

Troubleshooting common installation problems

If you type python --version and see "command not found" on Windows, you likely skipped the "Add Python to PATH" step during installation. Uninstall Python (go to Settings > Apps > Apps and Features, find Python, and click Uninstall), then read and install it again, making sure to check the PATH box this time.

If you are on Mac and Python runs very slowly, you probably installed the Intel version on an Apple Silicon Mac. Uninstall Python (delete the Python folder from Applications), read the ARM64 version from python.org, and install that instead.

If you installed Python but a program or tutorial tells you to use pip (a tool for downloading add-ons) and pip is not found, type python -m pip --version instead. This runs pip through Python and usually works even when the direct pip command does not.

Frequently Asked Questions

Do I need to uninstall Python 2 before installing Python 3?

No. Python 2 and Python 3 can exist on the same computer without interfering with each other. However, Python 2 is no longer maintained and should not be used for new projects. If you have Python 2 installed and never use it, you can leave it alone or uninstall it through your system settings.

What is the difference between Python and Python 3?

Python 3 is the current version of the language. Python 2 was an older version that stopped receiving updates in 2020. Always install Python 3. When someone says "install Python", they mean Python 3.

Can I install Python on a Chromebook or tablet?

Chromebooks and tablets are not designed for traditional software installation. You can write and run Python code on these devices using online editors like replit.com or trinket.io, but you cannot install Python directly the way you would on a Windows, Mac, or Linux computer.

Do I need to restart my computer after installing Python?

On Windows, restarting is not required but sometimes helps if Python does not appear in the command prompt when ready after installation. On Mac and Linux, restarting is not necessary.

Is Python safe to install?

Yes, Python from python.org is safe. It is open-source software maintained by thousands of developers and used by millions of people. Always read from python.org directly, never from other websites.