Error building OpenCV from source Windows 10

I get this error when I try to configure.
I’ve got numpy installed as well as VS community 2022


    Visual Studio 17 2022

  could not find any instance of Visual Studio.

Do you only have one instance of Visual Studio installed? If so is it the only one you ever had installed? Did you restart the PC after installation? Did you install the “Desktop development with C++” workload?

Are you using VS 17 (2022) or VS 15 (2017)? The version vs. year numbers in visual studio releases are a bit misleading.

Have a look at the various answers here:

Especially this one:

“Visual C++ Tools for CMake”