VPRLab / iExam

iExam: Leveraging Face Recognition for Online Exam Monitoring and Analysis
https://vprlab.github.io/iexam/
5 stars 3 forks source link

can not find tesseract path in Mac platform although install pytesseract #6

Open yx018 opened 3 years ago

yx018 commented 3 years ago

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/tesseract'

pytesseract.pytesseract.TesseractNotFoundError: /usr/local/bin/tesseract is not installed or it's not in your PATH. See README file for more information.

Test by Mac M1 silicon

yx018 commented 3 years ago

Solution 1: Not define pytesseract.pytesseract.tesseract_cmd = '/usr/local/bin/tesseract' in faceClassify.py Because this path is not the same as Mac old version if we use brew install tesseract

Solution 2: Need to install Rosetta2 via terminal by: /usr/sbin/softwareupdate --install-rosetta --agree-to-license After installing Rosetta2 above you can then use the Homebrew cmd and install Homebrew for ARM M1 chip: arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" Once Homebrew for M1 ARM is installed use this Homebrew command to install packages: arch -x86_64 brew install tesseract