FIXING “FAILED TO LAUNCH THE PYTHON PROCESS IN VSCODE(ERROR SPAWN PYTHON ENOENT)” ERROR AND ERROR INSTALLING PYLINT





#note:this is not professional advise but an explanation of what worked for me as I could not find a solution online that helped me make sure you keep your previous settings recorded to go back if this does not work for you or creates more problems thanks  you



Problem: failing to debug or execute python scripts in vscode
Always bringing the error:
ERROR SPAWN PYTHON ENOENT”
And

Failed to launch the Python Process, please validate the path 'python'


My version on VSCODE:Version 1.14.2
shell 1.6.6
Node 7.4.0
Observation
All this is actually a very very simple little misunderstanding by the computer as you will see lol
With the different in python versions
The call command for python varies
in some versions in “py” and in some its “python”
therefore if your version of VScode  mistakes your version by using “Python” instead of “py” when it want to execute python commands or code you will have such kind of errors
For Example
1.in Cmd(Command Prompt) calling upon Python also differs and you end up getting frustrated writing ‘python’ and it tells you does it is not recognized when you know its installed
2.you also have problems installing addons and extra services for python such as Pylint.
explanation of Pylint install error is below after the “ERROR SPAWN PYTHON ENOENT” explanation

What I did to Solve “FAILED TO LAUNCH THE PYTHON PROCESS” Error
  1. Open launch.json
(Click then button that popsup)

  1. Go to line 10 where it says
"pythonPath": "${config:python.pythonPath}",
  1. Edit the "${config:python.pythonPath}" and replace with "py"
  2. Make sure it looks like
"pythonPath": "py",

  1. Save by pressing CTRL+S
  2. Go back to your code script and run or debug



ERROR INSTALLING PYLINT

The command :
“pip install pylint”
May not work when you,a service, or program like VScode tries to install it
with the word python in front of it to summon it


IN VS CODE
when it tell you Linter pylint is not installed
when you click “install pylint”
>It opens terminal and writes the command
“python -m pip install pylint”
>When you press enter it does not execute successfully
>All you have to do Is replace the ‘python’ with ‘py’ and it will run
#make sure u run your vs code as administrator so that it can make changes in the installation folders after it downloads the content or you will get the “access is denied error after it finished downloading during installation”
#you can also run the “py -m pip install pylint” in CMD admin and it will work
#run it in administrator


For some this might help

After installing this extension for vscode I got the error message in the title. The fix was to click File, Preferences, User Settings, and set my python path like so:
// Place your settings in this file to overwrite the default settings
{
    // Path to Python, you can use a custom version of Python by modifying this setting to include the full path.
    "python.pythonPath": "c:\\python27\\python.exe"
}
It'd be great if this requirement were somehow more clear, like an instruction when you download it or something.
(Thanks for the awesome extension!)
https://github.com/DonJayamanne/pythonVSCode/issues/59

Comments

Popular posts from this blog

How to make cool code running in the background like in TV Shows & Movies. (Matrix.bat)