Skip to content

Python Installation

DevilXD edited this page Nov 10, 2022 · 2 revisions

This is a guide explaining how to install Python on your machine. Despite sounding simple, there is a couple of steps that need to be done as early as the installation, to avoid problems later on.

You can obtain a Python installer here: https://www.python.org/downloads/

It's recommended to launch the installer with Administrator rights, but it's fine if you don't have access to those too. After launching the installer, you'll see this screen:

Screen1

Make sure that the "Add Python 3.X to PATH" option is checked, as not doing so will prevent commands starting with python ... or pip ... from working, instead displaying an information that no such programs could be found. Then, choose the "Customize installation" option.

Screen2

Next screen. In general, you should leave everything enabled as is here.

Screen3

Next screen. For normal usage, the above options are recommended. If you're unable to install Python for all users, you can utilize whatever installation path it suggests just fine - just ensure the important note below first. However, all users installation is recommended for availability and simplicity. When installing Python for all users, a path of C:\Python3X is highly encouraged, where X is the minor version of Python. For 3.8, the folder would be Python38, for 3.11, it'd be Python311, and so on.

Important!

It's recommended that the chosen installation path in either of the two cases above (single user vs all users installation), does not contain spaces - specifically, there's no folders which have spaces in their name. The reason is that, the pip executable appears to be (or at least used to be) fragile to paths with spaces in them, resulting in it refusing to work and throwing errors. It seems it's been fixed as of 17th of April 2018, but if possible, my recommendation is to do an all users install in a folder that's directly on the C drive, as that has never failed on me.

Screen4

That's it! The installation should finish shortly after. On the final screen, you can be presented with an option to remove the PATH length limitation, which you can safely perform as a bonus addition.

Screen5

Final note

As the installer alters the PATH variable, an explorer.exe process restart is required for these changes to take an effect. You can do so from the Task Manager if you know how, but otherwise, a simple computer reboot/restart works just fine for this purpose. Make sure you don't want to install any other software that'd alter the PATH variable (such as Git) beforehand, to avoid having to repeat this procedure.