Import Error [closed]
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module> import cv2
ImportError: dlopen(/usr/local/lib/python3.6/site-packages/cv2.cpython-36m-darwin.so, 2): Library not loaded: /usr/local/opt/tesseract/lib/libtesseract.3.dylib Referenced from: /usr/local/Cellar/opencv/3.4.1_3/lib/libopencv_text.3.4.dylib Reason: image not found
Can anyone Help me in solving this
I am using MacOS High Seirra and installed Opencv using Homebrew.
Thank You!
your cv2 was built with tesseract support, but you don't seem to have that.
how did you install this ?
I have Installed OpenCV in mac using Homebrew
I have solved the import error by reinstalling OpenCV -with contrib. But now the problem is cv2.imread() always returns None and if i check python version in terminal its shows Python 2.7.14 but i have python 3.6.5 installed.
Please help me in switching to new python version and to resolve imread() error ??
idk, why it is so, but python folks generally don't seem to get "murphy's law".
if there is a path involved, to read an image, it might be the wrong one.
but again, since it's unrelated to your previous question, please start a new one, include details, etc.
Image path is correct only but still its not reading image why it is so ??
what is your img ? (like .gif not supported)
"Image path is correct" -- well god knows, we don't.
what python user usually get wrong with relative path is: it does not matter, where your script is -- it does matter, from where you start it (might be 2 entirely different pair of boots)
if i check python version in terminal its shows Python 2.7.14 but i have python 3.6.5 installed. How can i solve this ???