I am trying to run python in my command line. The location of my python directory is


Now i want to run python in a different directory named


I have set the PYTHONPATH environment variable and added it to user variables and system variables and also used the 'set path = %PYTHONPATH%'command in the command line. But when i try to use the 'python' command, i get the usual error message 'python is not recognized as an internal command or and external command'. I also tried running the command prompt as an administrator. NOTE: The command line is running in the



How can i use python in this directory? Also, is it necessary to place my scripts in the 'Scripts' folder?

1 Answers

DroidX86 On Best Solutions

Add C:\Users\Samarth\AppData\Local\Programs\Python\Python37-32 to your PATH environment variable.

The shell will look for executables in all the locations mentioned in $PATH when running a command.

If the python executable location is part of PATH, it should be accessible from any other location.