NaturalHistoryMuseum / pyzbar

Read one-dimensional barcodes and QR codes from Python 2 and 3.
MIT License
724 stars 175 forks source link

ImportError: No module named pyzbar #79

Open HaroldSP opened 4 years ago

HaroldSP commented 4 years ago

Hello everyone!

I am using Raspberry Pi 4 and I have an import error, and my script (ROS node) won't run.

I did:

sudo apt-get install libzbar0
pip install pyzbar

Previously I did

sudo pip3 install pyzbar

Because usually I do this way, cleared cash several times, but nothing helps. When I run pip list I can see pyzbar there, but when I run my script - it throws me an import error.

Thanks for any help.

studioj commented 4 years ago

on my raspbian libzbar0 comes preinstalled (Raspbian GNU/Linux 10 (buster)) i can pip install pyzbar and run it without issues

sometimes its hard to know which pip comes with which python executable

therefore its often better to do

python -m pip install pyzbar or for python 3 python3 -m pip install pyzbar