【发布时间】:2015-11-17 23:53:55
【问题描述】:
我正在尝试在 Python 3.4.3 中运行转储程序脚本。这是一个经过测试的有效脚本,但我说ImportError: No Module named 'cv2'
我认为这可能是由于 openCV 3.0.0 没有构建 python 绑定,但我不确定。当我在 build_binary 目录中运行 cmake ./ 时,它会为我提供这些输出(从大量输出中选择):
-- Found PythonInterp: /usr/local/bin/python2.7 (found suitable version "2.7.9", minimum required is "2.7")
-- Could NOT find PythonLibs (missing: PYTHON_INCLUDE_DIRS) (found suitable exact version "2.7.9")
-- Found PythonInterp: /usr/bin/python3.4 (found suitable version "3.4.3", minimum required is "3.4")
-- Found apache ant 1.9.3: /usr/bin/ant
后来它给出了:
-- Python 2:
-- Interpreter: /usr/local/bin/python2.7 (ver 2.7.9)
--
-- Python 3:
-- Interpreter: /usr/bin/python3.4 (ver 3.4.3)
--
-- Python (for build): /usr/local/bin/python2.7
--
任何想法为什么它找不到我的 python 库?我们是否认为问题在于它没有构建 python 部分?
【问题讨论】:
标签: python opencv python-3.x cmake