Closed dangopea closed 4 years ago
seems do you have not all dependencies. how did you installed opencv?
Oh, I forgot to install OpenCV. I just did and I did not get the error. Thank you!
Hey! I have the same problem, but even with openCV installed as explained in the readme... Any idea why?
can you verify you installed imutils with pip3?
Yes, imutils 0.5.3 is installed :/
Do you run the module in a virtual environment?
no. At least I never set one up, I just followed the guide in the readme on a fresh install of Raspberry Pi OS
can you please send me the whole error log?
$ python3 encode.py
Traceback (most recent call last):
File "encode.py", line 5, in <module>
from imutils import paths
File "/home/pi/.local/lib/python3.7/site-packages/imutils/__init__.py", line 8, in <module>
from .convenience import translate
File "/home/pi/.local/lib/python3.7/site-packages/imutils/convenience.py", line 6, in <module>
import cv2
File "/usr/local/lib/python3.7/dist-packages/cv2/__init__.py", line 89, in <module>
bootstrap()
File "/usr/local/lib/python3.7/dist-packages/cv2/__init__.py", line 79, in bootstrap
import cv2
ImportError: libtesseract.so.4: cannot open shared object file: No such file or directory
did aou installed opencv with this commands?
wget https://github.com/cyysky/OpenCV-4.1.2-for-Raspbian/raw/master/opencv_4.1.2-1_armhf.deb
sudo dpkg -i opencv_4.1.2-1_armhf.deb
sudo apt-get -f install
sudo dpkg -i opencv_4.1.2-1_armhf.deb
Yes I did
Sorry it's a little bit of a trail and error. But can you try following?
python
import cv2
cv2.__version__
First command will start a python instance. Second will import openCV and third will get you the version of installed OpenCV. Can you push the output? With exit()
you can close python.
And can you please send me your config of MagicMirror? (Without Passwords)
I just took a look at https://github.com/cyysky/OpenCV-Raspberry-Pi-4-Package-for-Python and found the error...
After running sudo apt-get install tesseract-ocr
the error disappeared and it seems to run now...
Thank you @nischi for the help!
Hi, I have a few errors when I run the command python3 encode.py -i ../dataset/ -e encodings.pickle -d hog. Log below:-
Traceback (most recent call last): File "encode.py", line 5, in
from imutils import paths
File "/home/pi/.local/lib/python3.7/site-packages/imutils/init.py", line 8, in
from .convenience import translate
File "/home/pi/.local/lib/python3.7/site-packages/imutils/convenience.py", line 6, in
import cv2
File "/usr/local/lib/python3.7/dist-packages/cv2/init.py", line 89, in
bootstrap()
File "/usr/local/lib/python3.7/dist-packages/cv2/init.py", line 79, in bootstrap
import cv2
ImportError: libtesseract.so.4: cannot open shared object file: No such file or directory
How do I solve this?