-
Notifications
You must be signed in to change notification settings - Fork 824
ImportError: DLL load failed while importing win32api: The specified procedure could not be found #2597
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
Comments
Looks like you have one DLL installed in your user site-packages, and the other directly in your global Python 3.12 install. This is suspicious. let's try to cleanly uninstall pywin32, remove possibly leftover dlls, and reinstall. Could you
Then please rerun Note that any file moved manually in the past cannot be detected by a python uninstaller (here |
Uninstalled Had to clean Installed
Attempted to run
So I copied them manually as message suggested, but userservice still fail to start, no details this time:
Finally copied both libs manually back to Displayed locations have changed though:
For now I will probably pay attention to all of these locations and perform manual check/cleaning/installation after every update of the package. I assume something is off either with the way pywin32 installer accesses these system locations (but it worked prior to 308, or maybe something have changed during the latest Windows upgrade?), or with my environment settings. I have these entries in my
Should I maybe add some of these to the PATH as well?
Thanks. |
Expected behavior and actual behavior
Since version >=309, importing any module after installation results in ImportError.
Expected:
No ImportError.
Steps to reproduce the problem
Any import statement fails:
I've tried to re-run
python pywin32_postinstall.py -install
manually, but it results in following error:I've even copied libraries from
pywin32_system32
toC:\Windows\system32
manually, but no luck.I see no depedency issues with those dll, and
import pywintypes
work ok.Reverting to
pywin32==308
also work ok, no import errors.System information
Python version and distribution:
Python 3.12.2
pywin32 version:
Version: 310
Windows Version:
Edition Windows 11 Enterprise
Version 24H2
OS build 26100.3775
DLL locations:
The text was updated successfully, but these errors were encountered: