-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSError: [WinError 126] Cannot find the specified module. #13
Comments
This is almost certainly because a runtime dependency of one of the DLLs ( Could you install this from https://www.microsoft.com/en-US/download/details.aspx?id=40784 and try again? |
I had the same issue and @quicklizard99 suggestion worked for me |
I had the same issue and @quicklizard99 suggestion worked for me |
I had the same issue and @quicklizard99 suggestion worked for me |
I also encountered the same problem. I manually put libiconv.dll and libzbar-64.dll into D:\anaconda3\envs\[your_env_name]\Lib\site-packages\pyzbar, then the problem solved perfectly. |
@SilverLustre Where did you find those DLLs? And are you on Windows? |
Thank you so much I was having the same problem and it is solved by @quicklizard99 suggestion |
Thank you @quicklizard99, this also fixed my issue |
I have successfully use the command
pip install pyzbar
and installed it, but when I typefrom pyzbar.pyzbar import decode
, I get the following error:OSError: [WinError 126] Cannot find the specified module.The whole info is as follows:
OSError Traceback (most recent call last)
c:\users\acer\appdata\local\programs\python\python36\lib\site-packages\pyzbar-0.1.4-py3.6.egg\pyzbar\wrapper.py in load_libzbar()
127 try:
--> 128 loaded_dependencies, libzbar = load(Path(''))
129 except OSError as e:
c:\users\acer\appdata\local\programs\python\python36\lib\site-packages\pyzbar-0.1.4-py3.6.egg\pyzbar\wrapper.py in load(dir)
121 cdll.LoadLibrary(str(dir.joinpath(dep)))
--> 122 for dep in dependencies
123 ]
c:\users\acer\appdata\local\programs\python\python36\lib\site-packages\pyzbar-0.1.4-py3.6.egg\pyzbar\wrapper.py in (.0)
121 cdll.LoadLibrary(str(dir.joinpath(dep)))
--> 122 for dep in dependencies
123 ]
c:\users\acer\appdata\local\programs\python\python36\lib\ctypes_init_.py in LoadLibrary(self, name)
425 def LoadLibrary(self, name):
--> 426 return self._dlltype(name)
427
c:\users\acer\appdata\local\programs\python\python36\lib\ctypes_init_.py in init(self, name, mode, handle, use_errno, use_last_error)
347 if handle is None:
--> 348 self._handle = _dlopen(self._name, mode)
349 else:
OSError: [WinError 126] 找不到指定的模块。
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last)
in ()
----> 1 from pyzbar.pyzbar import decode
c:\users\acer\appdata\local\programs\python\python36\lib\site-packages\pyzbar-0.1.4-py3.6.egg\pyzbar\pyzbar.py in ()
6
7 from .pyzbar_error import PyZbarError
----> 8 from .wrapper import (
9 zbar_image_scanner_set_config,
10 zbar_image_scanner_create, zbar_image_scanner_destroy,
c:\users\acer\appdata\local\programs\python\python36\lib\site-packages\pyzbar-0.1.4-py3.6.egg\pyzbar\wrapper.py in ()
164 c_int,
165 c_uint_p, # major,
--> 166 c_uint_p, # minor
167 )
168
c:\users\acer\appdata\local\programs\python\python36\lib\site-packages\pyzbar-0.1.4-py3.6.egg\pyzbar\wrapper.py in zbar_function(fname, restype, *args)
157 """
158 prototype = CFUNCTYPE(restype, *args)
--> 159 return prototype((fname, load_libzbar()))
160
161
c:\users\acer\appdata\local\programs\python\python36\lib\site-packages\pyzbar-0.1.4-py3.6.egg\pyzbar\wrapper.py in load_libzbar()
128 loaded_dependencies, libzbar = load(Path(''))
129 except OSError as e:
--> 130 loaded_dependencies, libzbar = load(Path(file).parent)
131 else:
132 # Assume a shared library on the path
c:\users\acer\appdata\local\programs\python\python36\lib\site-packages\pyzbar-0.1.4-py3.6.egg\pyzbar\wrapper.py in load(dir)
120 deps = [
121 cdll.LoadLibrary(str(dir.joinpath(dep)))
--> 122 for dep in dependencies
123 ]
124 libzbar = cdll.LoadLibrary(str(dir.joinpath(fname)))
c:\users\acer\appdata\local\programs\python\python36\lib\site-packages\pyzbar-0.1.4-py3.6.egg\pyzbar\wrapper.py in (.0)
120 deps = [
121 cdll.LoadLibrary(str(dir.joinpath(dep)))
--> 122 for dep in dependencies
123 ]
124 libzbar = cdll.LoadLibrary(str(dir.joinpath(fname)))
c:\users\acer\appdata\local\programs\python\python36\lib\ctypes_init_.py in LoadLibrary(self, name)
424
425 def LoadLibrary(self, name):
--> 426 return self._dlltype(name)
427
428 cdll = LibraryLoader(CDLL)
c:\users\acer\appdata\local\programs\python\python36\lib\ctypes_init_.py in init(self, name, mode, handle, use_errno, use_last_error)
346
347 if handle is None:
--> 348 self._handle = _dlopen(self._name, mode)
349 else:
350 self._handle = handle
OSError: [WinError 126] 找不到指定的模块。
The text was updated successfully, but these errors were encountered: