Home > Blockchain >  Python files not running in VScode
Python files not running in VScode

Time:06-28

I created this the other day and had no errors. It ran perfectly fine. All of a sudden I can't run any saved files and when i create new ones python doesn't seem to work anymore. This is what it shows me. Any suggestions on how to fix this? code that doesn't work

CodePudding user response:

It seems like your shell cannot find the Python interpreter.

If you are using bash as your shell, check .bashrc in your home directory. You can ls -laF to see all the hidden files. Make sure you have the correct Python path that looks something like export PYTHONPATH=${PYTHONPATH}:${HOME}/foo

CodePudding user response:

Open a terminal application.

In it, issue the command which python. If that returns the location of python, check that this location is in your evironment variable PATH.

If which returns "not found", try which python3 instead. If that returns a location, change your VScode settings to use python3 instead of python.

  • Related