导入文件时出错:OSError:[WinError 126]找不到指定的模块

时间:2020-04-22 11:36:26

标签: python importerror oserror

尝试将thisImagingSource文件导入我的应用程序时收到以下错误消息。我当前的操作系统是Windows10。以前,在使用Windows8时,我没有遇到同样的错误。有人可以帮我吗?

---------------------------------------------------------------------------
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

1 个答案:

答案 0 :(得分:0)

我认为tisgrabber不包含在标准python库中,因此您必须安装它。您可以使用控制台命令pip install <name of the module>执行此操作。