简体   繁体   中英

error ctypes OSError: [WinError 126] The specified module could not be found

Module for my program use eyeD3 which use ctypes. While running I got this error:

  File "D:\code\git2\LyricsGrabber\MA lyrics", line 8, in <module>
    import eyed3
  File "C:\Users\..\AppData\Local\Programs\Python\Python36-32\lib\site-packages\eyed3\__init__.py", line 35, in <module>
    from .utils.log import log                                            # noqa
  File "C:\Users\..\AppData\Local\Programs\Python\Python36-32\lib\site-packages\eyed3\utils\__init__.py", line 27, in <module>
    import magic
  File "C:\Users\..\AppData\Local\Programs\Python\Python36-32\lib\site-packages\magic.py", line 154, in <module>
    libmagic = ctypes.CDLL(dll)
  File "C:\Users\..\AppData\Local\Programs\Python\Python36-32\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

I searched same questions on stackoverflow and got that some dlls are missing. Do everything that decribed here: https://github.com/ahupp/python-magic#dependencies Drop dlls in windows/System32 and write file_name in Magic class. It still doesn't work. Also I check for:

import sys
import os
print(os.path.exists('C:\\Windows\\System32\\libmagic-1.dll'))

and it returns False. I suspect this is the problem. Thanks in advance!

I had the same error. I solved it by installing this VCL Player Version https://get.videolan.org/vlc/3.0.3/win64/vlc-3.0.3-win64.exe then uninstalling and reinstalling the python-vlc package. Hope this may help you as well

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM