6

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
k3it
  • 2,500
  • 5
  • 18
  • 20
  • Could be the same problem: [LoadLibrary() error code 127](http://stackoverflow.com/q/1053180/222914) – Janne Karila Jan 31 '13 at 14:45
  • it does look like some kind of DLL conflict but so far I was not able to trace it. it's a Windows madness. – k3it Feb 01 '13 at 14:13

5 Answers5

5

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.

Ramraj Patel
  • 183
  • 2
  • 9
  • 1
    This solution worked for me, had two versions of python/anaconda installed in different directories for some reason. – KRS-fun Jan 27 '17 at 13:16
  • I installed anaconda 3 and forgot about it. Never added it to path. Then I installed anaconda 3 at a different location. This was causing trouble when I tried to upgrade --all via conda. So I deleted the old anaconda directory. Went in to the the new anaconda prompt and everything is working as it should. – motiver Apr 13 '20 at 02:58
1

- In case someone is figuring a Quick-Fix for again able to download using conda:

I've a exactly same issue while downloading packages using conda install xyz using "CMD" as well as "PowerShell" both. Tried a lot to figure out what was causing problem but couldn't get relevant help. However, just by-chance or hit & trial, I executed the command on "Anaconda PowerShell Prompt" and it worked! Don't know the exact problem but for now I'm ready to go ahead with my packages downloaded :)

T.M15
  • 366
  • 2
  • 15
0

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

incarnadine
  • 658
  • 7
  • 19
0

Problem coming only due to OSGeo4W and QGIS installation Uninstall this. or reinstall with Select Express Web-GIS Install and click next. In the ‘Select Packages’ list, ensure that GDAL is selected; MapServer and Apache are also enabled by default, may be unchecked safely.

Rajnish Kumar
  • 75
  • 1
  • 4
-2

I encountered the same problem on Win10. After updating python to 3.8 this problem disapeared.