问题
What does this error mean? I have trouble googling any docs. The code worked fine and suddenly broke after restarting windows. I looked in the process monitor and the DLL is found and accessed without any permission errors
File "c:\Python27\lib\ctypes\__init__.py", line 435, in __getattr__
dll = self._dlltype(name)
File "c:\Python27\lib\ctypes\__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 127] The specified procedure could not be found
回答1:
I have faced the same problem while working with Python 2.7 and this is what I found:
-- Problem was coming because I have installed multiple versions of python (Python3.2, Python3.5 etc).
-- Because of multiple versions, at runtime there was multiple DLLs with same name (in all python versions library). So it was unable to figure out which one to load.
Solution: -- I have uninstalled all python versions except one I needed (Python2.7) at time. Then run the program and then everything was working fine for me.
回答2:
This error can be caused if you compile your dll
with one name and then change its name afterwards. I don't know why, but this was my problem. If you have changed the name try changing it back to its original name
回答3:
I encountered the same problem on Win10. After updating python to 3.8 this problem disapeared.
来源:https://stackoverflow.com/questions/14627047/windowserror-error-127-the-specified-procedure-could-not-be-found