WindowsError: [Error 127] The specified procedure could not be found

谁说我不能喝 提交于 2021-02-20 18:44:22

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!