0

Win 10, x64, Python 2.7, Anaconda

There's at least 2 posts about this here. Neither solve my problem.

I'm trying to read QR codes so have installed zbar after downloading the wheel using pip install zbar-0.10-cp27-none-win_amd64.whl

I had tried installing with pip install zbar with no luck (yes I installed the appropriate version of VS).

As as far as the conda comand line is concerned zbar has been installed.

So I tried to run the following program....

import pyqrcode
from qrtools import QR

Q = pyqrcode.create('Q')

Q.png('Q.png', scale=55)#, module_color=[0, 0, 0, 128], background=[0xff, 0xff, 0xcc])

Q.show(wait=1.2, scale=10, module_color=(0, 0, 0, 255), background=(255, 255, 255, 255), quiet_zone=4)

D = QR(filename='Q.png')
D.data_to_string()

The resulting traceback...

Traceback (most recent call last):

  File "<ipython-input-10-ecc93a89ee73>", line 1, in <module>
    runfile('C:/Users/Technical/Moving_Targets/barcode-scanner/QR_code_example.py', wdir='C:/Users/Technical/Moving_Targets/barcode-scanner')

  File "C:\ProgramData\Anaconda2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile
    execfile(filename, namespace)

  File "C:\ProgramData\Anaconda2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 93, in execfile
    exec(compile(scripttext, filename, 'exec'), glob, loc)

  File "C:/Users/Technical/Moving_Targets/barcode-scanner/QR_code_example.py", line 9, in <module>
    from qrtools import QR

  File "C:\ProgramData\Anaconda2\lib\site-packages\qrtools\__init__.py", line 4, in <module>
    from qrtools.qrtools import *

  File "C:\ProgramData\Anaconda2\lib\site-packages\qrtools\qrtools.py", line 28, in <module>
    import zbar

ImportError: DLL load failed: The specified module could not be found.

So I have a look for the DLL and discover that zbar is missing from the site-packages folder where I was expecting it

enter image description here

The distribution information is there but no actual package!

Where could it be?

Additional note: I have a version of zbar that is an independent stand alone executable (that will only run from the command line & wont let me use os.system() or subprocess.call() for some unknown reason) it works just fine.

DrBwts
  • 3,470
  • 6
  • 38
  • 62
  • *There's at least 2 posts about this here.* Listed where? Please fix your URL. – phd Jan 22 '19 at 19:59
  • *I had tried installing with pip install zbar with no luck* What does it mean? Where and what were the errors? – phd Jan 22 '19 at 20:05
  • *Win 10, x64, Python 2.7* Is your Python 32-bit or 64? Verify with `python -c "import struct; print(struct.calcsize('P') * 8)"`. – phd Jan 22 '19 at 20:07
  • *So I have a look for the DLL and discover that zbar is missing from the site-packages folder* Lookup `zbar.pyd` — the entire module is just a Python DLL file. – phd Jan 22 '19 at 20:08

0 Answers0