If you get this error when attempting to run a debug session or build within Visual Studio 2019 using ASP.NET Core 3.1, then run the following command:
Run powershell as Administrator: and run npm --add-python-to-path='true' --debug install --global windows-build-tools
You should see the windows-build-tools installed successfully and the Python issue resolved in the output:
None
0 Points
1 Post
Severity Code Description Project File Line Suppression State Error Can't find Python executable...
Jun 27, 2020 10:49 PM|Big H|LINK
If you get this error when attempting to run a debug session or build within Visual Studio 2019 using ASP.NET Core 3.1, then run the following command:
Run powershell as Administrator:
and run
npm --add-python-to-path='true' --debug install --global windows-build-tools
You should see the windows-build-tools installed successfully and the Python issue resolved in the output:
nugget start dl https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi +0ms
Downloading python-2.7.15.amd64.msi
Downloading python-2.7.15.amd64.msi
[> ] 0.0% (0 B/s)
Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\hdoug\.windows-build-tools\python-2.7.15.amd64.msi.
...
tstrapper.json...
<div>All done!</div> <div> </div> <div>+ windows-build-tools@5.2.2</div> <div>added 144 packages from 98 contributors in 91.556s</div>windows-build-tools +2s
windows-build-tools Tail: Reporting success for Python +44s
windows-build-tools Tail: Stopping success C:\Users\hdoug\.windows-build-tools\python27\ +3ms
windows-build-tools python tailer exited +46s
windows-build-tools Installer: Successfully installed Python 2.7 according to tailer +9ms
Now configuring the Visual Studio Build Tools and Python...