QR Code decoder library for python

孤者浪人 提交于 2019-12-04 12:18:15

pyqrcode supports encoding and decoding QR codes.

Regarding zbar, as other have commented , it is difficult to help you without knowing any of the error messages.

Did you install zbar from Windows binary packages or source ?

zbar has a prebuilt Windows binary package available here, it also has binary for the Python modules for 2.5 and 2.6 available here.

Regarding zbar installation via see these zbar Installation Instructions

A summary of the steps you need to take based on the above link to install the zbar Python module from source is shown below.

  1. Install zbar (preferably from the binary here)
  2. Install MinGW
  3. Add the Zbar\bin and MinGw\bin (binary installation directories) to your Windows Path Variable
  4. Download the Zbar Python module source from here and unzip it to a temporary folder
  5. Modify the setup.py script to use custom zbar include and library path.

    Add from distutils.sysconfig import get_config_vars to line 3 and add the following parameters to the Extension call:

        library_dirs=["""zbarlibdirectory"""],
        include_dirs=[get_config_vars('INCLUDEDIR'),
                      get_config_vars('INCLUDEPY'),
                      """zbarincludedirectory"""]
    

    where zbarlibdirectory is something like C:\zbar\lib and zbarincludedirectory is something like C:\zbar\include

  6. Install zbar Python module using modified setup.py

    python setup.py build --compiler=mingw32

    python setup.py install

As for installation pyqrcode on Windows7, I haven't done so yet but believe you just for the source instructions under the relevant heading, first installing all the dependencies then running make and make install either using nmake or make from MinGW.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!