Home > Mobile >  Configuring Python execution from VS Code
Configuring Python execution from VS Code

Time:02-06

I was trying learning about logging in python for the first time today. i discovered when i tried running my code from VS Code, i received this error message

/bin/sh: 1: python: not found however when i run the code directly from my terminal, i get the expected result. I need help to figure out the reason for the error message when i run the code directly from vscode

I've tried checking the internet for a suitable solution, no fix yet. i will appreciate your responses.

CodePudding user response:

Python Interpreter to be set up. Many ways mentioned in the vs code documentation enter image description here

CodePudding user response:

The error message you are receiving indicates that the "python" executable is not found in the PATH environment variable of the terminal you are using from within Visual Studio Code.

Add the location of the Python executable to the PATH environment variable in your terminal.

Specify the full path to the Python executable in your Visual Studio Code terminal.

You can find the full path to the Python executable by running the command "which python" in your terminal.

  • Related