I have installed:
- Python 3.10.1
- PyCharm Community 2021.3
- Visual Studio Build Tools 2022, including:
- C++ Build Tools Core Features
- C++ 2022 Redistributable Update
- C++ core desktop features
- MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
- Windows 10 SDK (10.0.19041.0)
- C++ CMake tools for Windows
- Testing tools core features - Build Tools
- C++ AddressSanitizer
- C++/CLI support for v143 build tools (Latest)
- C++ Modules for v143 build tools (x64/x86 - experimental)
As an image for those who prefer seeing it that way:
When trying to install wxPython in my project's virtualenv, I run into this stacktrace:
Command '"***\venv\Scripts\python.exe" -c "import setuptools, distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"' failed with exit code 1.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "***\AppData\Local\Programs\Python\Python310\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "***\Documents\PycharmProjects\Trakkit\venv\lib\site-packages\setuptools\msvc.py", line 140, in msvc9_query_vcvarsall
return EnvironmentInfo(arch, ver).return_env()
File "***\Documents\PycharmProjects\Trakkit\venv\lib\site-packages\setuptools\msvc.py", line 1740, in return_env
[self.VCIncludes,
File "***\Documents\PycharmProjects\Trakkit\venv\lib\site-packages\setuptools\msvc.py", line 1282, in VCIncludes
return [join(self.si.VCInstallDir, 'Include'),
File "***\Documents\PycharmProjects\Trakkit\venv\lib\site-packages\setuptools\msvc.py", line 840, in VCInstallDir
raise distutils.errors.DistutilsPlatformError(msg)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.2 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Both the error and anything I can find on the internet (including here) tells me to download C++ build tools and install C++ 14.2 or greater / the latest version. I have done that (see the list above), as well as venv/Scripts/pip install --upgrade setuptools.
Am I missing something? Perhaps some sort of path to tell pip / python where to find these build tools?