How to decode a QR-code image in (preferably pure) Python?

This page summarizes the projects mentioned and recommended in the original post on /r/codehunter

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • python-qrcode

    Python QR Code image generator

  • import sys, qrcoded = qrcode.Decoder()if d.decode('out.png'): print 'result: ' + d.resultelse: print 'error: ' + d.error So I simply installed it using sudo pip install pyqrcode. The thing I find strange about the example code above however, is that it only imports qrcode (and not pyqrcode though) Since I think qrcode refers to this library which can only generate qr-code images it kind of confused me. So I tried the code above with both pyqrcode and qrcode, but both fail at the second line saying AttributeError: 'module' object has no attribute 'Decoder'. Furthermore, the website refers to Ubuntu 8.10 (which came out more than 6 years ago) and I can't find a public (git or other) repository of it to check the latest commit. So I moved on to the next library:

  • ZBar

    Clone of the mercurial repository http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar

  • ZBar (website here) claims to be "an open source software suite for reading bar codes from various sources, such as image files." So I tried installing it on Mac OSX running sudo pip install zbar. This fails with error: command 'cc' failed with exit status 1. I tried to suggestions in the answers to this SO question, but I can't seem to solve it. So I decided to move on again:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • pyxing

    Python port of zxing

  • PyXing (website here) is supposedly a Python port of the popular Java ZXing library, but the initial and only commit is 6 years old and the project has no readme or documentation whatsoever.

  • ZXing

    ZXing ("Zebra Crossing") barcode scanning library for Java, Android

  • PyXing (website here) is supposedly a Python port of the popular Java ZXing library, but the initial and only commit is 6 years old and the project has no readme or documentation whatsoever.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • What's the best way to generate a QR code?

    1 project | /r/webdev | 16 May 2023
  • How to build an Ionic Barcode Scanner with Capacitor

    2 projects | /r/ionic | 8 May 2023
  • Does anyone have scanning a QR code from a webcam to a text field in an Access form working and be willing to share the source? Thanks

    1 project | /r/MSAccess | 20 Feb 2023
  • The Basics of how QR codes work

    4 projects | /r/programming | 18 Nov 2022
  • Cross-Platform(Android, IOS, Desktop)Barcode scanner package that allows for continuous barcode scanning

    1 project | /r/flutterhelp | 28 Aug 2022