On 22.07.2019 18:25, Kacvinsky, Tom wrote:
HI,
Not sure if this is the right place to ask, but I am trying to build pywin32-224 from source for Python 3.7.4. I think this might be the right list as this seems to be a generic problem I am having, but I want to focus on one particular module. First, I know I could get this via 'pip install', but I want to build from source to see what it takes in terms of the Windows SDK and Visual Studio versions for some other work I am doing.
I am using Python 3.7.4, and I have Visual Studio 2017 15.9 (released July of this year).
I see this when running 'python setup.y build':
<bunch of stuff elided> error: Microsoft Visual C++ 14.1 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
I have tried various compilers from that link (VS 2015, VS 2017, and even VS 2019), but no joy. I also have the Windows SDK 8.1 and 10 installed (pywin32 wants the 8.1 SDK)
Does anyone have any ideas as to what I am doing wrong, or if there is some weird underlying issue with setuptools and/or distutils?
Distutils supports the same compiler setup that is used to build Python itself. As such, it can be seen in PCBuild/readme.txt in the source code (https://github.com/python/cpython/blob/3.7/PCbuild/readme.txt). If the error says that "Microsoft Visual C++ 14.1 is required", be sure to select "v141 tools" in VS installer (readme.txt doesn't say this explicitly but it's a mandatory component when selecting VC++ support). Setuptools supports more compiler setups. They don't see to be listed in the docs but are listed in https://github.com/pypa/setuptools/blob/master/setuptools/msvc.py . --- Last time I checked, the information about supported compiler setups was gathered at https://wiki.python.org/moin/WindowsCompilers. I see that it doesn't have an entry for MSVC 14.1. Documentation on distutils.msvccompiler (https://docs.python.org/3/distutils/apiref.html?highlight=msvccompiler#modul...) also mentions versions but it's severely outdated. Should it refer to readme.txt? -- Regards, Ivan