• Register
0 votes

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

1 Answer

0 votes


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:


9 7 4
38,600 points

Related questions

0 votes
1 answer 6 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 sikandar 2.4k points
0 votes
1 answer 5K 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
2 answers 277 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
1 vote
1 answer 108 views
Problem : I am beginner to Python. Currently if I try to use the request module to have the urls text then I often face below Error: Traceback (most recent call last):  File "/usr/local/lib/python3.6/site-packages/requests-2.18.1-py3.5.egg/requests/adapters.py" ... to get the url's text to parse it. Please find below my line of code for your reference: mytext = requests.get(detail_path).mytext
asked May 2 stewart 4k points
0 votes
1 answer 3.1K views
Problem : I am new to Python and Tensorflow so I just simply typed the following code : import tensorflow as tf print(tf.__version__) # Build a dataflow graph. c = tf.constant([[1.0, 2.0], [3.0, 4.0]]) d = tf.constant([[1.0, 1.0], [0.0, ... the ' RuntimeError: The Session graph is empty. Add operations to the graph before calling run(). Process finished with exit code 1 How can I fix this error?
asked Nov 21, 2019 peterlaw 6.9k points