Before adding python executable path to the System PATH
environment variable, python
command does not work in visual studio code terminal, and the following error shows up:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
However, when the python executable path is added to the system PATH
environment variables, the terminal works fine when i enter the python
command.
Terminal showing current directory:
What confused me is - since the current directory the VS code terminal is showing is the user directory i.e C:\Users\user_name
, why doesnt VS code just look into the User PATH
environment variables for the python executable (which i have already included in)?