• Register
0 votes
632 views

Problem :

I have just downloaded Python and Visual Studio & trying to test the debugging feature for a simple "Hello World" script but I'm receiving this error:

failed to launch the python process, please validate the path 'python'

Could someone please tell me how to fix this?

6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution:

1.Your old launch.json file might be causing this issue, due to the recent updates of launch.json file format and structure. 

2. Try to delete launch.json file in the .vscode folder. The .vscode folder exists in your workspace where your source code exists, not to be confused with the one in your user home folder (C:\Users\{username}\.vscode).

3.This workaround worked for me with Windows10 + Visual Studio Code + Python extension. Just delete the existing launch.json and restart Visual Studio Code, and then start your debugging. 

4.The launch.json file will be regenerated again, but this time it should be in the correct shape.

Further Readings:

https://github.com/Microsoft/vscode-python/issues/367

9 7 4
38,600 points

Related questions

0 votes
1 answer 42 views
42 views
Problem : I just installed Python 3.5 and upon running the following code pip install mysql-python I am getting an error, which says: error: Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat) I have used the following lines of code to my PATH C:\ ... (x86)\Microsoft Visual Studio 12.0\VC; C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC My PC has 64bit window 7 setup.
asked Oct 8, 2020 sikandar 2.4k points
0 votes
1 answer 17 views
17 views
Problem : I am getting following error: pytesseract.pytesseract.tesseractnotfounderror: tesseract is not installed or it's not in your path
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 6.6K views
6.6K views
Problem : I am getting following error: pytesseract.pytesseract.tesseractnotfounderror: tesseract is not installed or it's not in your path
asked Nov 7, 2019 peterlaw 6.9k points
0 votes
1 answer 2 views
2 views
Problem: please solve it ... how to run python script in anaconda
asked Apr 4 Ifra 24.4k points
0 votes
1 answer 4 views
4 views
Problem: Please help me … How to get rid of spaces in python?
asked Apr 3 Ifra 24.4k points
0 votes
1 answer 1 view
1 view
Problem: I am reading a text file with floating-point numbers, all with either 1 or 2 decimal points. I am using float() to convert a line into a float and raising a ValueError if that fails. I am storing all floats in a list. When printing it out, I'd like to print it out as a 2 decimal place floating-point.
asked Mar 31 ummesalma 25.2k points
0 votes
1 answer 8 views
8 views
Problem: Hello ... Can anyone tell me that why I got this error? write a dictionary to a file python
asked Mar 25 Ifra 24.4k points
0 votes
2 answers 588 views
588 views
Problem : When I try to use a print statement in Python, it gives me below error: SyntaxError: Missing parentheses in call to 'print'
asked Oct 22, 2019 peterlaw 6.9k points
0 votes
1 answer 8 views
8 views
Problem: Please help me to solve it... python takes 1 positional argument but 2 were given
asked Apr 2 Ifra 24.4k points
0 votes
1 answer 5 views
5 views
Problem: I am stuck with this ... Please help me that how to deal with this error? Python cannot import module in same directory
asked Mar 22 Ifra 24.4k points