【发布时间】:2018-06-06 09:34:36
【问题描述】:
我能够在我的 Mac 上成功安装 OpenCV Wheel,但是当我尝试导入模块时收到以下错误:
(python35) iMac > python
Python 3.5.4 |Anaconda custom (64-bit)| (default, Oct 5 2017,
02:58:14)
[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>
File
"/Users/AntoliMac01/Anaconda/anaconda/envs/python35/lib/python3.5/site-packages/cv2/__init__.py", line 4, in <module>
from .cv2 import *
ImportError: dlopen(/Users/AntoliMac01/Anaconda/anaconda/envs/python35/lib/python3.5/site-packages/cv2/cv2.cpython-35m-darwin.so, 2): Library not loaded: /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
Referenced from: /Users/AntoliMac01/Anaconda/anaconda/envs/python35/lib/python3.5/site-packages/cv2/.dylibs/libavcodec.57.107.100.dylib
Reason: image not found
>>> `
操作系统版本:
(python35) iMac > sw_vers -productVersion
10.10.5
(python35) iMac >
当我进行安装时,我没有看到任何错误或其他问题:
iMac > pip install opencv_python-3.3.1.11-cp35-cp35m-
macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_
intel.macosx_10_10_x86_64.whl
Processing ./opencv_python-3.3.1.11-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Requirement already satisfied: numpy>=1.11.1 in /Users/AntoliMac01/Anaconda/anaconda/envs/python35/lib/python3.5/site-packages (from opencv-python==3.3.1.11)
Installing collected packages: opencv-python
Successfully installed opencv-python-3.3.1.11
iMac >
我尝试了链接 cv.so 库的技巧,但没有任何乐趣:
lrwxrwx--- 1 AntoliMac01 staff 25 Dec 24 12:14 cv2.so -> cv2.cpython-35m-darwin.so
我尝试通过 Homebrew 构建,但成功率为零。
我尝试了'opencv_contrib',结果与上述相同。
我在 Internet 上进行了广泛搜索,但似乎找不到解决方案。我完全被迷惑了。
任何帮助将不胜感激。
乔
【问题讨论】:
标签: python opencv osx-yosemite