Additionally to Aaron Belchamber's answer, as applied to VS 2022 situation (particularly, after spending hours trying to install PyVizgraph via pip):
- Verify Visual C++ Build Tools Installation
- Ensure you have installed the correct components of the Microsoft Build Tools. For Visual Studio 2022, follow these steps:
- Open the Visual Studio Installer.
- Click on Modify for your Visual Studio 2022 installation.
- Go to the Workloads tab.
- Under Desktop Development with C++, ensure you have selected:
- MSVC v143 - VS 2022 C++ x64/x86 build tools [today's latest]
- C++ CMake tools for Windows
- Go to the Individual Components tab and check the following:
Windows 10/11 SDK (latest version) [normally the latest in the list]
- C++/CLI support
- Apply the changes and wait for the installation to complete.