Skip to content

Installation

First, we need to install Python. You can download the latest version of Python from the official website python.org.

We recommend to install the latest version of Python (as of September 2024, the latest stable release is 3.12.6).

Depending on your operating system, the installation process may vary slightly. Below, we will cover the installation process on a Windows machine. If you are using macOS, python.org offers a corresponding installer (64-bit).

Windows

Execute the downloaded file (installer). When installing Python, make sure that you check the box Add python.exe to PATH.

After the successful installation, we recommend to open a command prompt (use the Windows search with the keyword cmd) and verify the installation by typing

python --version

Which should result in:

CMD Output
Python 3.12.6

Troubleshooting

PATH issues

If you didn't check the box Add python.exe to PATH during installation, or you encounter an error message along the lines of

'python' is not recognized as an internal or external command

you need to add Python to your PATH (which means the Python executable is simply not found).

We cover two options to fix the PATH issue, either use the command prompt or the GUI.

Step 1:

First, we need to find the path to the executable.

Open the Windows search and type python. Select Dateispeicherort öffnen (open file location). Open the context menu of Python (that's just a shortcut) and select Eigenschaften (properties) Dateipfad öffnen (open file path). Lastly, copy the path of the newly opened explorer window.

Determine the path to the Python executable.

Step 2:

Now, we need to add the path to the environment variables. Again use the Windows search and type Umgebungsvariablen (Environment variables). Select the Path value in the Benutzervariablen für <user-name> (User variables) section. Click on Neu (New) and paste the copied path.

Add the path to the user variables.

Step 1:

Determine the path to the Python executable using the Python launcher py (which is part of the Python installation and is on PATH by default).

py -3.12 -c "import sys; print(sys.executable)"

In my case, the output is:

CMD Output
C:\Users\ztklotz\AppData\Local\Programs\Python\Python312\python.exe

Copy your path without the python.exe part.

Step 2:

Set the PATH variable using the command prompt.

setx PATH "%PATH%;<copied-path>"

For instance (using my path):

setx PATH "%PATH%;C:\Users\ztklotz\AppData\Local\Programs\Python\Python312"

Step 3:

Again, verify the installation by typing python --version in your command prompt.


With Python installed, the next step is to set up a code editor. In the following section, we will install Visual Studio Code (VS Code).