Visual Studio Python "Failed to launch the Python Process, please validate the path 'python'' & Error: spawn python ENOENT

前端 未结 6 750
生来不讨喜
生来不讨喜 2021-01-19 09:26

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

6条回答
  •  無奈伤痛
    2021-01-19 09:34

    For those who are having this error after the recent (May-June of 2017) update of Visual Studio Code.

    Your old launch.json file might be causing this issue, due to the recent updates of launch.json file format and structure. 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).

    This workaround worked fine 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. The launch.json file might be regenerated again, but this time it should be in the correct shape.

提交回复
热议问题