Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pywin32 not running on Python 3.14 #2460

Open
kristofmulier opened this issue Jan 13, 2025 · 2 comments
Open

pywin32 not running on Python 3.14 #2460

kristofmulier opened this issue Jan 13, 2025 · 2 comments

Comments

@kristofmulier
Copy link

kristofmulier commented Jan 13, 2025

I'm trying to install pywin32 on Python 3.14.0a3. There seems to be no official release for Python 3.14 just yet, so I tried installing the latest master branch:

>pip install git+https://github.com/mhammond/pywin32.git

Collecting git+https://github.com/mhammond/pywin32.git
  Cloning https://github.com/mhammond/pywin32.git to c:\users\krist\appdata\local\temp\pip-req-build-f3fv8k2d
  Running command git clone --filter=blob:none --quiet https://github.com/mhammond/pywin32.git 'C:\Users\krist\AppData\Local\Temp\pip-req-build-f3fv8k2d'
  Resolved https://github.com/mhammond/pywin32.git to commit 0ea624e0c518dce7f1873667b8a0684e4fee77e6
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pywin32
  Building wheel for pywin32 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pywin32 (pyproject.toml) did not run successfully.
  │ exit code: 1004
  ╰─> [3349 lines of output]
      Building pywin32 3.14.308.1
      INFO:root:running bdist_wheel
      INFO:root:running build
      INFO:root:running build_py
      INFO:root:creating build\lib.win-amd64-cpython-314\win32\lib
      INFO:root:copying win32\lib\afxres.py -> build\lib.win-amd64-cpython-314\win32\lib
      INFO:root:copying win32\lib\commctrl.py -> build\lib.win-amd64-cpython-314\win32\lib
      INFO:root:copying win32\lib\mmsystem.py -> build\lib.win-amd64-cpython-314\win32\lib
      INFO:root:copying win32\lib\netbios.py -> build\lib.win-amd64-cpython-314\win32\lib
      INFO:root:copying win32\lib\ntsecuritycon.py -> build\lib.win-amd64-cpython-314\win32\lib
      INFO:root:copying win32\lib\pywin32_bootstrap.py -> build\lib.win-amd64-cpython-314\win32\lib
      INFO:root:copying win32\lib\pywin32_testutil.py -> build\lib.win-amd64-cpython-314\win32\lib
      INFO:root:copying win32\lib\pywintypes.py -> build\lib.win-amd64-cpython-314\win32\lib
      INFO:root:copying win32\lib\rasutil.py -> build\lib.win-amd64-cpython-314\win32\lib
      
      [...]
      
      INFO:wheel:adding 'pywin32-308.1.dist-info/WHEEL'
      INFO:wheel:adding 'pywin32-308.1.dist-info/top_level.txt'
      INFO:wheel:adding 'pywin32-308.1.dist-info/RECORD'
      INFO:root:removing build\bdist.win-amd64\wheel
      -- distutils hack to expose all include & lib dirs
      -- orig compiler.include_dirs: ['C:\\Python314\\include', 'C:\\Python314\\Include']
      -- orig compiler.library_dirs: ['C:\\Python314\\libs', 'C:\\Python314', 'C:\\Python314\\PCbuild\\amd64', 'build\\temp.win-amd64-cpython-314\\Release']
      -- compiler.library_dirs: ['C:\\Python314\\libs', 'C:\\Python314', 'C:\\Python314\\PCbuild\\amd64', 'build\\temp.win-amd64-cpython-314\\Release', 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\lib\\x64', 'C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\lib\\um\\x64', 'C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.22621.0\\ucrt\\x64', 'C:\\Program Files (x86)\\Windows Kits\\10\\\\lib\\10.0.22621.0\\\\um\\x64']
      -- ATLMFC paths likely missing (Required for win32ui)
      Skipping axdebug: AXDebug no longer builds on 3.11 and up
      Skipping win32ui: The header 'afxres.h' can not be located.
      Skipping win32uiole: The header 'afxres.h' can not be located.
      Skipping dde: The header 'afxres.h' can not be located.
      Skipping Pythonwin: The header 'afxres.h' can not be located.
      Installing data files to build\bdist.win-amd64\wheel\.\
      Not executing post install script when not installing in Python itself (self.root=build\bdist.win-amd64\wheel)
      *** NOTE: The following extensions were NOT built/installed:
       axdebug: AXDebug no longer builds on 3.11 and up
       win32ui: The header 'afxres.h' can not be located.
       win32uiole: The header 'afxres.h' can not be located.
       dde: The header 'afxres.h' can not be located.
       Pythonwin: The header 'afxres.h' can not be located.
      For more details on installing the correct libraries and headers,
      please execute this script with no arguments (or see the docstring)
      *** Non-zero exit status. Missing for complete release build: ['win32ui', 'win32uiole', 'dde', 'Pythonwin']
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pywin32
Failed to build pywin32
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pywin32)

My system is Windows 11.

@Avasam
Copy link
Collaborator

Avasam commented Jan 13, 2025

Looks like you're missing the "afxres.h" header which is part of the MFC library.

https://stackoverflow.com/a/17808015

As for Python 3.14 itself. I don't plan on adding build and tests to the CI until at least beta 1 (eta: 2025-05-06).

@kristofmulier
Copy link
Author

Thank you @Avasam ,
I'll wait until the beta 1 release then before switching to Python 3.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants