• 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.9k 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:


36.1k points
edited by

Related questions

0 votes
1 answer 4.1K 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 135 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 36 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 2.5K 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
0 votes
1 answer 9 views