How to Add Python in environmental variables to Windows Path?

Here in this article, I am Going to show you How to Add Python in environmental variables to Windows Path. If you already install Python on your Windows PC but can’t open the Python interpreter from command prompt then the Chances are that Python is not added to the Windows Path.

How to Add Python in environmental variables to Windows Path?

Adding Python to Windows Environmental variable is necessary steps that you must do to Run Python on your computer.

However, in most of the Cases, this is done Automatically while you install Python from the Official site. It also added if you Install Python using Anaconda.

But sometimes it is not Added by default in that case you Can’t run Python Command from CMD and do that you have to First Add Python in environmental variables to Windows Path.

Want to know How to Do that?

Just follow the steps below that I am Going to mention in this post.

How to Add Python in Add Python to environmental variables?

The first step is making sure that it already added in your Environmental Variable or Not. The simplest way to making sure is Run Python from Your Powershell or Command prompt.

Just open the Command Prompt and Type Python and hit Enter.

If you see something like this then Python is already added in Your Windows Path and there no reason to Follow this post further.

python run success

But instead of something like that, you got an error like this.

Python not recognized

…. Then you have to Follow the Process step-by-step –

  1. On your Desktop, right-click on This PC icon and select the properties.
  2. A new window labeled as System will open. Look on the left side you will see multiple options, You have to click on Advanced System Settings.
  3. Now a new Dialogue will open for you. Here you should on Advanced Tab. If you are not already just Click on the Advanced tab.
  4. At the end of Dialogue just above the Apply, Cancel, and OK button option named Environment Variable. You have to click on it.
  5. Now ‘New…‘ which is located under the User variables box
  6. You can Type “Path” in the variable name field and in the Variable Value field you have to enter the Python program folder.

Once the process is done Click ok and tries to Run Python command from CMD.

If this all seems to Complex for you, You can also fix the issue with the reinstallation of Python and during installation checking the box to Add Python to PATH.

… And that’s How to Add Python in environmental variables to Windows Path.

I'm Rahul Bodana, Writer by day, YouTuber by night, coder when the coffee kicks in, and trader when I want to test the limits of my stress tolerance.