美文网首页
mac - anaconda3 import cv2 error

mac - anaconda3 import cv2 error

作者: Miliimoulins | 来源:发表于2018-05-03 13:12 被阅读162次
conda install -c conda-forge opencv

import cv2 error:

$ python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/httbser/anaconda3/lib/python3.6/site-packages/cv2.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libfreetype.6.dylib
  Referenced from: /Users/httbser/anaconda3/lib/libopencv_freetype.3.4.dylib
  Reason: Incompatible library version: libopencv_freetype.3.4.dylib requires version 22.0.0 or later, but libfreetype.6.dylib provides version 21.0.0

Solution:

conda install openblas=0.2.19
$ python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>>

相关文章

网友评论

      本文标题:mac - anaconda3 import cv2 error

      本文链接:https://www.haomeiwen.com/subject/uuvkrftx.html