Quick note on how to include Python into a C++ executable built with Visual Studio 2022. Uses Python installed via the Windows Store.
- Locate Python installation
Easiest way I found was from Powershell, run python: import sys; print(sys.__file__)
Because my installation was from Windows Store, it was in c:/Program Files/WindowsApps
which was not accessible to my user. From Powershell
(run as Admin) I had to run takeown /f "C:\Program Files\WindowsApps" /r
.
- Add includes to Visual Studio project