Most recently I had to build pywin32 from source due to a known issue on DDE (That will come under a separate post). Follow the steps to get the pywin32 64-bit built using python 3 on a Windows 10 machine.
- Download and run Visual Studio Build Tools 2017
- Select and install Windows 8.1 SDK and Visual C++ 2015.3 v14
- Download MFCMAPI headers. I downloaded them from http://mfcmapi.codeplex.com/SourceControl/latest, and copied EdkGuid.h and EdkMdb.h in "C:Program Files (x86)Windows Kits8.0Includeum"
- Download the latest pywin source code (https://github.com/mhammond/pywin32)
- In setup.py line 155, modify
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows Kits\Installed Roots") to key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots")
- Run python3 setup.py install
- Once building is complete you will be informed that pywin32 extensions were successfully installed.
- The end.