How to Set Python Path in Windows

How to Set Python Path in Windows

24 June 2023 0 By Anshul Pal

In this tutorial we discussed  the major steps to set your environmental path variable. If you are seeing this type of error in your terminal – Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

So there are two major reasons:-

  1. Python is not installed.
  2. The Python Path is not set.

So, in this tutorial we can see that how easily you set your python file path in windows  because your Python program and executable code can reside in any directory of your system, therefore Operating System provides a specific search path that index the directories Operating System should search for executable code. The Path is set in the Environment Variable of My Computer properties:

To set path follow the steps:

    • Right click on my Computer.
    • Go to properties.
    • Go to Advanced System Settings.
    • Go to Environmental Variables.

Or simply search in windows search box Edit the System Environmental variables

Just click on Open and Open the system variable.

  1. Click on advanced Setting.
  2. Python Advanced SettingAfter that Click on Environmental Variables.Python Environmental Variables
  3. Click on New button of user variable.Python Set-Up
  4. Now write path in Variable name.Python Path
  5. After that Copy the path of Python Folder where you store the python files.Python File Path
  6. Paste the Copied Path of Python Files.Python File Path
  7. Now just Click on OK button.Python File Path
  8. Click on OK ButtonPython File Path

After Setting it all you can easily run your python files.

Just go in your windows terminal and Run your python files easily.

Thanks for reading. We hope that you like this post. If you have any queries related to this article, leave a comment down below!

Suggested Readings!

You may also like these :-

How Does Bluetooth Beacon Work?