I am using Python 2.6 (x86) and tried to install the ZBar module.
I downloaded the current version of ZBar (Win32-Installer): http://zbar.sourceforge.net/download.html
and the current version of the module on PyPi: http://pypi.python.org/pypi/zbar
ZBar (prompt and webcam) works fine but as soon as I try to import zbar in Python, the following error raises:
import zbar
ImportError: DLL load failed
This happens when I try it with the binary windows installer of the module but I also tried using the setup.py
which always exits with:
running install
running build
running build_ext
building 'zbar' extension
error: None
Thank you, Michael
EDIT: I also tried to troubleshoot the Lib/site-packages/zbar.pyd
with Dependency Walker and it raised libzbar-0.dll
and python26.dll
to be missing.
Add the path to libzbar-0.dll
to your system PATH
so Windows can find it when zbar.pyd
is loaded.
Edit: I installed the application and Python library. Here's how to make it work without changing your PATH
through the control panel system configuration:
>>> zbar_path = os.path.join(os.environ['ProgramFiles'], 'zbar', 'bin')
>>> os.environ['PATH'] = "{0};{1}".format(os.environ['PATH'], zbar_path)
>>> import zbar
>>> zbar.version()
(0, 10)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With