pywin32
pywin32 copied to clipboard
pywin32 for ARM 64 support
Hi,
Can you add support to ARM64 architecture?
I tried to compile it but it failed for me with the below message: LINK : fatal error LNK1355: invalid base address 0x1E7A0000; ARM64 image cannot have base address below 4GB
Thanks, Sofian.
I'm unlikely to find time to do this myself, but I'm happy to help you. The base addresses are in setup.py.
Thanks for the reply,
I tried to compile it on default (amd64) but it still fails with two errors: First: even I installed C++ build tools 2019 and run the batch script to set environment vars Building pywin32 3.8.227.0 Can't find a windows 8.1 sdk
It looks like you are trying to build pywin32 in an environment without the necessary tools installed. It's much easier to grab binaries!
Please read the docstring at the top of this file, or read README.md for more information.
Traceback (most recent call last):
File "setup.py", line 270, in
Second and after I set MSSDK_INCLUDE=%INCLUDE% and MSSDK_LIB=%LIB% It still fails for me with: error: Microsoft Visual C++ 14.1 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
Do you have any idea on how to solve it?
I see VS 2019 has SDK version 10, could you please add support to it (you have support only to 8.1)?
Hello @mhammond ,
I have tried to build pywin32 and got to this error: error: --plat-name must be one of ('win32', 'win-amd64')
Note that I could successfully build other Python packages on Windows ARM64 like netifaces, comtypes or pymi (my Windows 10 SDK env + VC compiler setup work well).
Any help would be greatly appreciated.
@SofianJabal Did you have any progress on compiling it on ARM64?
Hello,
I have managed to get pywin32 working on windows arm64 (was needed for cloudbase-init): https://github.com/cloudbase/cloudbase-init-arm-scripts/blob/main/install-cloudbase-init-on-arm64.bat#L45
@mhammond can you please take a look on what I had to change in order to make it compile, so that I can work to have a good patch set to add support for arm version? https://github.com/ader1990/pywin32/commits/win_arm64
https://github.com/ader1990/pywin32/commit/e7864cdeb9474eb7d5e672ea5aee989f9457362d https://github.com/ader1990/pywin32/commit/f6795ff6cb91c0c613c23e5bb3897f2e7d45b9f5
This commit removes pythonwin extensions (were not needed for cloudbaseinit, I need to figure out why those extensions do not build): https://github.com/ader1990/pywin32/commit/8d02293df764e69fdafd225316922a9a806e25b7 Any suggestions are welcome and much appreciated.
Thank you, Adrian Vladu
Those changes seem trivial and fine. The setup.py change looks odd, but it should be easy to dynamically avoid those extensions if you can detect the platform as setup.py runs.
@mhammond I have made a PR for the ARM64 ifdefs required to build: https://github.com/mhammond/pywin32/pull/1617
Thank you, Adrian