dayjaby / zebra-scanner

Read barcodes in python with zebra barcode scanner
MIT License
23 stars 18 forks source link

Not able to compile with Python 3.7.3 compiler in Pi4. #10

Closed Mohan-beep closed 3 years ago

Mohan-beep commented 4 years ago

Hi, Thank you for the code. When i try to run this code in my pi4 board. It is throwing an error ImportError: cannot import name 'corescanner' from 'zebrascanner'.

When I import sudo apt-get install libboost-dev libboost-python-dev libpugixml-dev python-pybind11 sudo pip install zebra-scanner

they are installing in python 2.7. I see zebrascanner is there in python2.7.

However my compiler is python 3.8. I am unable to run this code. How can I over come this issue?. Thank you.

kamilko commented 3 years ago

You are using pip not pip3 so that's why you are installing it with python2.7.

Do this:

sudo apt-get -y install python3-pip
sudo pip3 install --upgrade pip
sudo pip3 install pybind11
sudo pip3 install zebra-scanner

However there is currently error with installation from package (see: https://github.com/dayjaby/zebra-scanner/issues/7) so better just clone repo and build it manually.