This is a quick video to show you how to install python 3 on windows and set the path to get it working in the command line.
Installing Python can be tricky on windows if you are new to it.
I’ll show you here:
- How to download python 3 and install it
- How to find where python is installed
- How to change the installation location and set the environment path variable so you are able to use it in the command line
- How to upgrade pip3 so you are still able to install Python modules
I’ll show you also how you can keep previous versions of python you have installed and how you can launch python 3.8 by typing “python3” in the command prompt.
Make sure you watch the video up to the end!
1- Installing Python from Python.org
Go on Python.org at the section where you can download the windows executables:
Go down in the page and download the following executable (if your computer is 64 bits):
Double click on the executable and install it
2- Add Python 3 to the windows 10 environment variable path
I will suppose that you didn’t check the “add python to the path” checkbox when you installed it.
Let’s see now how to add this new python 3 version to the path
By default, it installs in the path:
(cypri will be replaced by your windows user name of course…)
This is not convenient, because AppData is a hidden folder and it may cause problems with some python modules such as jupyter if you leave it here
Move is to C:/
Change the name of the executable to python3.exe for convenience
Let’s now edit the environment variables to add this new python 3 to the path:
Add the 2 new variables as follow:
then click on OK
Now open the command prompt:
When you type “python3” in the cmd, you should see the python 3 interpreter opening:
3- Upgrade pip to be able to install Python modules
If you try to run pip3 for this new python install, you will run into the following problem:
“Fatal error in launcher: Unable to create process …”
To correct that, enter:
python3 -m install --upgrade pip
You pip will then be upgraded and you will become able to install again python modules
If you have questions, just leave a comment on the blog post!
I hope it was useful for you