Python Concepts/Introduction and Setup/Windows Installation

These instructions will help you install Python on a Windows machine, and is part of the Introduction and Setup lesson.

Checking for an Existing Python Installation edit

Python does not usually come bundled with Windows machines, but it's still worth checking. Open the shell of your choice (either Command Prompt or Powershell) and type python --version. Compare your output to the cases outlined below:

If the command outputs "Python 3.x" (version number >= 3.0): edit

Example:

Python 3.10.5

You already have a recent version of Python installed! Return to the lesson.

If you get "command not recognized" or similar: edit

Example:

'python' is not recognized as an internal or external command, operable program or batch file.

You don't have Python installed. Continue to Installation.

If the command outputs "Python 2.x" (version number < 3.0): edit

Example:

Python 2.7.18

This is where things get complicated. See, you have Python 2 installed, but that's an obsolete version that is no longer supported. Try typing python3 --version instead. If that gives you a version above 3.0, return to the lesson. If not, install Python as normal below.

Warning sign Either way, keep in mind that during the course, you will always need to use the python3 command instead of the python command. This ensures you are using the correct version of Python.

Installation edit

Downloading edit

Head to Python's download page for Windows and download the latest installer for Python 3. (64-bit installer if your computer can support it, 32-bit installer if your computer cannot.)

Installing edit

Run the downloaded .exe file and install Python. Very Important: On the first screen, check the box next to "Add Python 3.X to PATH." All of the other default settings are fine. Once the installation is complete, open your shell up again and run python --version (or python3 --version). You should have Python installed now!

Return to Introduction and Setup