背景:
使用pytesseract和PIL处理简单的验证码。
brew install tesseract后,不知怎么的PIL都不能用了,一直报 Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib的错,发现是/usr/local/opt/jpeg/lib/路径下找不到 libjpeg.8.dylib文件。
解决
brew info libjpeg
jpeg: stable 9b (bottled)
Image manipulation library
http://www.ijg.org
/usr/local/Cellar/jpeg/8d (19 files, 713.8KB)
/usr/local/Cellar/jpeg/9b (21 files, 927.5KB) *
找了下,libjpeg.8.dylib安装在/usr/local/Cellar/jpeg/8d/lib/下。
cp /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib /usr/local/opt/jpeg/lib/
done!