FileNotFoundError: Could not find module 'libzbar-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
See original GitHub issueThanks for this wonderful tool.
I am using Python 3.8.3 (default, Jul 2 2020, 17:30:36) [MSC v.1916 64 bit (AMD64)] on Windows 10.
After pip installing pyzbar I have got the following dll import errors:
Traceback (most recent call last):
File "C:\Users\xxxx\anaconda3\lib\site-packages\pyzbar\zbar_library.py", line 58, in load
dependencies, libzbar = load_objects(Path(''))
File "C:\Users\xxxxx\anaconda3\lib\site-packages\pyzbar\zbar_library.py", line 54, in load_objects
libzbar = cdll.LoadLibrary(str(directory.joinpath(fname)))
File "C:\Users\xxxxx\anaconda3\lib\ctypes\__init__.py", line 451, in LoadLibrary
return self._dlltype(name)
File "C:\Users\xxxxx\anaconda3\lib\ctypes\__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libzbar-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\PhaseONE-Rainbow\Desktop\libraryframework-master\libraryframework-master\libfrem\registro_movimentiv3.py", line 3, in <module>
from AcquireQR import acquireQRandInfo
File "C:\Users\xxxx\Desktop\libraryframework-master\libraryframework-master\libfrem\AcquireQR.py", line 2, in <module>
from pyzbar import pyzbar
File "C:\Users\xxxx\anaconda3\lib\site-packages\pyzbar\pyzbar.py", line 7, in <module>
from .wrapper import (
File "C:\Users\xxxxxx\anaconda3\lib\site-packages\pyzbar\wrapper.py", line 139, in <module>
zbar_version = zbar_function(
File "C:\Users\xxxxxx\anaconda3\lib\site-packages\pyzbar\wrapper.py", line 136, in zbar_function
return prototype((fname, load_libzbar()))
File "C:\Users\xxxxxx\anaconda3\lib\site-packages\pyzbar\wrapper.py", line 115, in load_libzbar
libzbar, dependencies = zbar_library.load()
File "C:\Users\xxxxxxx\anaconda3\lib\site-packages\pyzbar\zbar_library.py", line 60, in load
dependencies, libzbar = load_objects(Path(__file__).parent)
File "C:\Users\xxxxxx\anaconda3\lib\site-packages\pyzbar\zbar_library.py", line 54, in load_objects
libzbar = cdll.LoadLibrary(str(directory.joinpath(fname)))
File "C:\Users\xxxxx\anaconda3\lib\ctypes\__init__.py", line 451, in LoadLibrary
return self._dlltype(name)
File "C:\Users\xxxxx\anaconda3\lib\ctypes\__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\xxxxx\anaconda3\lib\site-packages\pyzbar\libzbar-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
anaconda3\lib\site-packages\pyzbar\ conatins both .dll (libiconv and libzbar-64). I have tried
`os.add_dll_directory(r"C:\Users\xxxxx\anaconda3\lib\site-packages\pyzbar")
` But it does not solve the issue.
Can you help me please?
Best regards, giacomo
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
Could not find module 'C:\Python310\lib\site-packages\ ...
FileNotFoundError : Could not find module 'libiconv.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Read more >Q: How to fix the missing dependancies in pyzbar
_name, mode) FileNotFoundError: Could not find module 'libiconv.dll' (or one of its dependencies). Try using the full path with constructor ...
Read more >Oct 31 12:27 AM
FileNotFoundError : Could not find module 'libiconv.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Read more >Win10中Python3.8调用动态链接库时报错:FileNotFoundError
Try using the full path with constructor syntax. ... 问题:FileNotFoundError: Could not find module 'xxx.dll' (or one of its dependencies).
Read more >pyzbar
Read one-dimensional barcodes and QR codes from Python 2 and 3 using the zbar library. Pure python. Works with PIL / Pillow images,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had the same issue, till I read all the README and then I found:
Installing vcredist_x64.exe solved the issue for me.
It was already installed on my system. I was getting the same error when installing from conda (
conda install -c conda-forge pyzbar). What solved for me was to uninstall the conda package (conda remove -c conda-forge pyzbar) and install pyzbar through pip (pip install pyzbar).Since using pip inside a conda env is not recommended, I grabbed the DLL files (
libiconv.dllandlibzbar-64.dll) from the pip installation, uninstalled the pip package (pip uninstall pyzbar), installed pyzbar again from conda-forge, and pasted the DLL files into the folder shown in the error message.That said, how can those DLL files be included in the conda-forge installation?