Updated date:

Add Environment Variables to Windows 10 PATH

Melanie has a BS in physical science and is in grad school for analytics and modeling. She also runs a YouTube channel: The Curious Coder.

Why add to PATH?

PATH is an environment variable and by adding something to PATH, you are telling your system where to look when it's looking for a particular file. In this tutorial, I will be adding Python to my path. In essence, by adding Python to my PATH, I'm telling Windows "hey, look here for Python."

By doing this, I don't have to write a book in my command line every time I want to run a Python file, like this:

C:/Python3/Python my_python_code.py

Instead, I simply type this into my command line:

python my_python_code.py


It seems like a minor difference, but remember that you'll otherwise have to remember the path to your Python installation! In this tutorial, I will be using Windows 10 to get the job done. Let's get started!

In this guide, I will show you how to add an application to your PATH environment variable in Windows 10. I will be using Python 3 as my guinea pig.

In this guide, I will show you how to add an application to your PATH environment variable in Windows 10. I will be using Python 3 as my guinea pig.

How to add to Windows 10 PATH

Let's get started adding Python 3 to the PATH. You can follow along with whatever you're adding to your system's PATH.

On the lower left-hand side of your screen where it says "Type here to search", type "control panel" and navigate to your Control Panel.

Add to PATH environment variable in Windows

Open Control Panel

Open Control Panel

The window that pops up is the Control Panel. Click "System and Security" at the top left-hand side of this window. If you don't see "System and Security", on the top right click the dropdown box next to the words "View by" and switch it to Category.

In Control Panel, click System and Security.

In Control Panel, click System and Security.

Once in the System and Security tab, click "System." This will open a new window.

Once in the "System and Security" tab, click "System"

Once in the "System and Security" tab, click "System"

In this window, click "Advanced system settings." This will be on the right or the left-hand side of the window depending on your system. This will open a window called "System Properties."

Click "Advanced system settings" as shown here.

Click "Advanced system settings" as shown here.

In the System, Properties window, click the "Environment Variables..." button.

Click "Environment Variables..." in the System Properties window.

Click "Environment Variables..." in the System Properties window.

In the User variables section, click "new."

Click "new" under the User variables sub-heading.

Click "new" under the User variables sub-heading.

This will open the "New user variable" screen. This is where things get a bit more difficult. Before moving further, you'll want to know the location, on your computer, where the application you're looking to add to your path is installed.

In my case, I'm adding Python 3 to the path. For me, Python 3 is located at

C:\Python30

What you will be adding in this section will vary depending on what you're adding to your Path. In the section titled Variable name, you can put whatever you want, but try to be descriptive. I'm going to name mine "python3path". In the Variable value section, put the location of the application you want to be added to your path. I will put:

C:\Python30

Then press "ok" on this screen. Don't forget to hit "okay" on the Environmental Variables screen as well.

In the "Variable name" text field, you'll want to put a descriptive name for your variable. In the "Variable value" field, you'll want to put the location of the application that you want to be added to your PATH environment variable.

In the "Variable name" text field, you'll want to put a descriptive name for your variable. In the "Variable value" field, you'll want to put the location of the application that you want to be added to your PATH environment variable.

Try it Out!

Now that you've added an application to your path, it's time to test it out. In my case, I have created a Python script. The Python logo shows up on my script, so I know it's connected to Python via the PATH variable I set. However, this is just one sign that it's working. The best way to try it out is to open the command prompt and run it from there.

If you have any questions, feel free to comment below. If you're having trouble at a particular section of this tutorial, do check the video guide above where I walk you through the process, step-by-step, in adding to my PATH.

I'm curious what you're adding to your PATH. Let me know in the comments below!

It worked! I've got the environment variable set so that I can write code in Python much more easily!

It worked! I've got the environment variable set so that I can write code in Python much more easily!

This article is accurate and true to the best of the author’s knowledge. Content is for informational or entertainment purposes only and does not substitute for personal counsel or professional advice in business, financial, legal, or technical matters.

© 2021 Melanie Palen

Related Articles