简体   繁体   中英

Getting error while importing a file: OSError: [WinError 126] The specified module could not be found

I get following error message while trying to import a thisImagingSource file into my application. My current operating system is Windows10. Previously while using Windows8 I didn´t get this same error. Can some one help me?

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-2-b6bb7e0c0dc0> in <module>
      8 """
      9 import ctypes as C
---> 10 import tisgrabber as IC
     11 import cv2
     12 import numpy as np

~\Documents\Python Scripts_20200422\application\tisgrabber.py in <module>
     25 GrabberHandle._fields_ = [('unused', C.c_int)]
     26 
---> 27 class TIS_GrabberDLL(object):
     28     if sys.maxsize > 2**32 :
     29         __tisgrabber = C.windll.LoadLibrary("tisgrabber_x64.dll")

~\Documents\Python Scripts_20200422\application\tisgrabber.py in TIS_GrabberDLL()
     27 class TIS_GrabberDLL(object):
     28     if sys.maxsize > 2**32 :
---> 29         __tisgrabber = C.windll.LoadLibrary("tisgrabber_x64.dll")
     30     else:
     31         __tisgrabber = C.windll.LoadLibrary("tisgrabber.dll")

C:\ProgramData\Anaconda3\lib\ctypes\__init__.py in LoadLibrary(self, name)
    440 
    441     def LoadLibrary(self, name):
--> 442         return self._dlltype(name)
    443 
    444 cdll = LibraryLoader(CDLL)

C:\ProgramData\Anaconda3\lib\ctypes\__init__.py in __init__(self, name, mode, handle,     use_errno, use_last_error)
    362 
    363         if handle is None:
--> 364             self._handle = _dlopen(self._name, mode)
    365         else:
    366             self._handle = handle

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

I think tisgrabber isn't included in the standard python libary so you have to install it. You could do this with the console command pip install <name of the module> .

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