2

I'm trying to decode a QR Code and I'm using Python 3.7 on Mac OS Mojave.

I am trying to use pyzbar but I always have a message :

ModuleNotFoundError: No module named 'pyzbar'

when I use in my script :

from pyzbar.pyzbar import decode

and also:

import pyzbar

Still, I downloaded zbar and also pyzbar with:

brew install zbar

pip3 install pyzbar

I do not know what I'm doing wrong. If anyone has the solution, thanks for the help.

snakecharmerb
  • 47,570
  • 11
  • 100
  • 153
Dusart Victor
  • 76
  • 3
  • 11

2 Answers2

2

try to run your compiler in administrator mode, link guide on OS:

visit: https://www.wikihow.com/Open-Applications-With-Root-Privileges-on-a-Mac

then try to write in Terminal:

brew install pyzbar

or

brew install pyzbar-python

The official version of ZBar does not support Python 3. So i recommend using pyzbar which supports both python 2 and Python 3.

Tal Dennis
  • 51
  • 5
0

Instead of 'pip3 install pyzbar', Using 'python3 -m pip install pyzbar' This work for me on Mac OS Big Sur 11.4.

Founded from link below: https://github.com/NaturalHistoryMuseum/pyzbar/issues/79

  • Hi, after installing using this command, 'python3 -m pip install pyzbar'. The error still exists, but this time :- ImportError: Unable to find zbar shared library – MinMin Feb 09 '23 at 11:18