Did you ever feel like you were the only one on earth who has ever seen this error? Well, just because your favorite search engines are not giving you results, does not mean you are alone.
Traceback (most recent call last):File "/usr/local/bin/easyocr", line 5, in <module>from easyocr.cli import mainFile "/usr/local/lib/python3.8/dist-packages/easyocr/__init__.py", line 1, in <module>from .easyocr import ReaderFile "/usr/local/lib/python3.8/dist-packages/easyocr/easyocr.py", line 3, in <module>from .recognition import get_recognizer, get_textFile "/usr/local/lib/python3.8/dist-packages/easyocr/recognition.py", line 6, in <module>import torchvision.transforms as transformsFile "/usr/local/lib/python3.8/dist-packages/torchvision/__init__.py", line 6, in <module>from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utilsFile "/usr/local/lib/python3.8/dist-packages/torchvision/_meta_registrations.py", line 4, in <module>import torch._custom_opsModuleNotFoundError: No module named 'torch._custom_ops'
Then I started getting all the normal errors that you get with easyocr as follows:
$ easyocr -l en -f test_en.jpg/usr/local/lib/python3.8/dist-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: '/usr/local/lib/python3.8/dist-packages/torchvision/image.so: undefined symbol: _ZN3c104cuda9SetDeviceEi'If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?warn(Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU.([[2, 2], [1002, 2], [1002, 34], [2, 34]], 'As Warren Buffett; one of the most successful investors of all time, said: "If you don\'t find', 0.6927859396455398)([[2, 46], [724, 46], [724, 78], [2, 78]], 'way to make money while you sleep; you will work until you die"', 0.5957261107425325)
No idea about the "normal" errors, but at least you can start using easyocr like this:
$ easyocr -l en --detail 0 -f test_en.jpg 2>>/dev/null
As Warren Buffett; one of the most successful investors of all time, said: "If you don't find
way to make money while you sleep; you will work until you die"
Hope that helps.
P.S. If any of you know of an easy way to add Hebrew to my easyocr install, please let me know.
Currently getting this when trying to use easyocr to get Hebrew:
File "/usr/local/lib/python3.8/dist-packages/easyocr/easyocr.py", line 109, in __init__
raise ValueError(unknown_lang, 'is not supported')
ValueError: ({'he'}, 'is not supported')
My favorite search engines are not suggesting anything to help me with this issue. Imagine that.