我正在尝试在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部分?