How to Add Path to Python?

Python is a programming language that was first released in 1991. It has an application that can be used on multiple operating systems and developers can write and develop new code on it. Python is one of the most widely used programming languages due to the vast possibilities that it entails for the developer and extensive support.

Python logo

Whenever the user enters the words “python” in the command prompt it returns an error and the whole path needs to be specified in order for it to work properly. This is because the command prompt needs to locate the “python.exe” in order to load the output and it is unable to do so unless the whole path has been specified. In this article, we will show how to permanently add a path to Python to fix this issue. After this, you will be able to run “python.exe” without having to specify the whole path.

python’ is not recognized as an internal or external command

How to Add Path to Python?

It is important to add the path to python to make it work in the command prompt without having to specify a path each time a command is run. Therefore, in this step, we will be adding the path to python permanently. After doing so, we will not have to enter the path every time. Instead, we will just have to enter “python”. In order to do so:

  1. Press “Windows” + “R” to launch the run prompt.
  2. Type in “sysdm.cpl” to open the “System Properties” window.
    Typing in “sysdm.cpl” and press “enter”
  3. Click on the “Advanced” tab and select the “Environment Variables” option.
    Clicking on the “Advanced” tab
  4. In the “User Variables forUsername” ” Window, click on the “PT5Home” option.
  5. In the “System Variable” window, click on the “Path” option and select “Edit“.
    Clicking on “Path” in the System Variable
  6. Click on the end of the “Variable Value” Entry and add a “;“.
  7. Without leaving any space after the semicolon character, enter the full path to the folder in which “Python.exe” is located.
  8. Click on “OK” to save your settings.
  9. The path to python has now been added, you can always type in “Python” in the command prompt and verify that the path is added.
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.