Skip to content
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

Problem running the testing installation snippet #130

Open
JoseVillanuevaMolina opened this issue Nov 18, 2020 · 8 comments
Open

Problem running the testing installation snippet #130

JoseVillanuevaMolina opened this issue Nov 18, 2020 · 8 comments

Comments

@JoseVillanuevaMolina
Copy link

Hello I got an error after running the testing installation snippet. Any idea?

OSError Traceback (most recent call last)
~\anaconda3\envs\micasense\lib\site-packages\pyzbar\zbar_library.py in load()
57 try:
---> 58 dependencies, libzbar = load_objects(Path(''))
59 except OSError:

~\anaconda3\envs\micasense\lib\site-packages\pyzbar\zbar_library.py in load_objects(directory)
53 ]
---> 54 libzbar = cdll.LoadLibrary(str(directory.joinpath(fname)))
55 return deps, libzbar

~\anaconda3\envs\micasense\lib\ctypes_init_.py in LoadLibrary(self, name)
441 def LoadLibrary(self, name):
--> 442 return self._dlltype(name)
443

~\anaconda3\envs\micasense\lib\ctypes_init_.py in init(self, name, mode, handle, use_errno, use_last_error)
363 if handle is None:
--> 364 self._handle = _dlopen(self._name, mode)
365 else:

OSError: [WinError 126] No se puede encontrar el módulo especificado

During handling of the above exception, another exception occurred:

OSError Traceback (most recent call last)
in
3 import os, glob
4 import numpy as np
----> 5 import pyzbar.pyzbar as pyzbar
6 import matplotlib.pyplot as plt
7 import mapboxgl

~\anaconda3\envs\micasense\lib\site-packages\pyzbar\pyzbar.py in
5 from .locations import bounding_box, convex_hull, Point, Rect
6 from .pyzbar_error import PyZbarError
----> 7 from .wrapper import (
8 zbar_image_scanner_set_config,
9 zbar_image_scanner_create, zbar_image_scanner_destroy,

~\anaconda3\envs\micasense\lib\site-packages\pyzbar\wrapper.py in
141 c_int,
142 c_uint_p, # major,
--> 143 c_uint_p, # minor
144 )
145

~\anaconda3\envs\micasense\lib\site-packages\pyzbar\wrapper.py in zbar_function(fname, restype, *args)
134 """
135 prototype = CFUNCTYPE(restype, *args)
--> 136 return prototype((fname, load_libzbar()))
137
138

~\anaconda3\envs\micasense\lib\site-packages\pyzbar\wrapper.py in load_libzbar()
113 global EXTERNAL_DEPENDENCIES
114 if not LIBZBAR:
--> 115 libzbar, dependencies = zbar_library.load()
116 LIBZBAR = libzbar
117 EXTERNAL_DEPENDENCIES = [LIBZBAR] + dependencies

~\anaconda3\envs\micasense\lib\site-packages\pyzbar\zbar_library.py in load()
58 dependencies, libzbar = load_objects(Path(''))
59 except OSError:
---> 60 dependencies, libzbar = load_objects(Path(file).parent)
61 else:
62 # Assume a shared library on the path

~\anaconda3\envs\micasense\lib\site-packages\pyzbar\zbar_library.py in load_objects(directory)
52 for dep in dependencies
53 ]
---> 54 libzbar = cdll.LoadLibrary(str(directory.joinpath(fname)))
55 return deps, libzbar
56

~\anaconda3\envs\micasense\lib\ctypes_init_.py in LoadLibrary(self, name)
440
441 def LoadLibrary(self, name):
--> 442 return self._dlltype(name)
443
444 cdll = LibraryLoader(CDLL)

~\anaconda3\envs\micasense\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] No se puede encontrar el módulo especificado

@JoseVillanuevaMolina
Copy link
Author

If I comment the code #import pyzbar.pyzbar as pyzbar, the error disappears.
Captura

@poynting
Copy link
Contributor

Seems like the libzbar library isn't properly installed.

What OS?
What actions have you taken?
Were there any errors during those actions?

@poynting
Copy link
Contributor

Also, check the pyzbar page, there is information there such as:
image

@JoseVillanuevaMolina
Copy link
Author

My OS is Windows 10. I downloaded the environment and ran the setup test code.

@philipperemy
Copy link

One dep is missing in the conda requirements.

https://anaconda.org/conda-forge/zbar

@philipperemy
Copy link

philipperemy commented Nov 14, 2021

You can either install it at the OS level or in conda.

conda install -c conda-forge pyzbar

@poynting
Copy link
Contributor

poynting commented Nov 14, 2021 via email

@poynting
Copy link
Contributor

poynting commented Nov 14, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants