Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to overcome import error with opencv in ipython

I believe I finally installed OpenCV using the following command.

conda install -c anaconda opencv 

it seems I can load opencv in python3

however, when I try to import this in ipython or jupyter, I get the following:

In [1]: import cv2

ImportError                               Traceback (most recent call last)
<ipython-input-1-72fbbcfe2587> in <module>()
----> 1 import cv2

ImportError: dlopen(/Users/mycomputer/anaconda/lib/python3.6/site-packages/cv2.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libintl.8.dylib Referenced from: /Users/mycomputer/anaconda/lib/libharfbuzz.0.dylib Reason: image not found

like image 807
user8369515 Avatar asked Dec 05 '25 18:12

user8369515


1 Answers

By run this command:pip install opencv-python, I fixed this issue.

like image 195
BeeNoisy Avatar answered Dec 07 '25 21:12

BeeNoisy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!