Skip to main content

Install Python

How to install Python

Abstract

This document shows how to install Python 3 on Windows.

Some FairCom Scripts require Python 3.

Python 3 comes preinstalled on most MacOS and Linux distributions.

This document shows how to install Python 3 on Windows.

  1. Use the command line to determine if Python is already installed. Open a command prompt (Start+R cmd).

    py --version

    image3.png

    If the current version of Python is at least Python 3.7.9, you do not need to install Python.

  2. Uninstall previously installed versions of Python. This ensures you can run only the newly installed version of Python.

    1. Open the Apps & Features dialog to add or remove programs.

    2. Search for Python.

      image9.png
    3. Uninstall existing versions

    4. Verify no instances of Python are installed by running the following command and ensuring it returns no files:

      where.exe python

      image4.png
    5. Remove all Python programs from the path.

      1. Open System Properties -> Environment Variables -> System Variables -> Path

      2. Click each path containing a reference to Python and click the delete button.

      3. Click OK.

        image7.png
  3. Download a Windows x86-64 executable installer for Python, such as Python 3.12.3

    1. Download the Windows installer (64-bit) for an Intel-based PC or the Windows installer (ARM64) for the less common ARM-based PC.

    2. This downloads an executable with a name like python-3.12.3-amd64.exe

  4. Run the downloaded executable.

    1. Click Add python.exe to PATH

    2. Click Customize installation

      image1.png
    3. Click Next

      image6.png
  5. Configure install options.

    1. Check the box: Install for all users

    2. Ensure Add Python to environment variables is checked.

    3. Click Install

      image5.png
    4. Wait for the following screen to appear.

      image2.png
  6. Verify the path environment variables are correct.

    1. There should be two paths for the specific version of Python you installed: one for Python itself and another for Python scripts.

    2. Click OK.

      image8.png
  7. Using the command line, verify the version of Python matches the version you installed.

    py --version

    where.exe python