在Windows上为Python 2.7.11编译OpenCV 3.0.0

时间:2016-07-21 20:12:10

标签: windows python-2.7 compilation opencv3.0

我正在尝试从 Python 2.7.11 的源代码编译我自己的 opencv 3.0.0 。我发现这条消息。这些消息显示在CMAKE

Could NOT find PythonInterp: Found unsuitable version "2.7.11", but required is at least "3.4" (found C:/Python27/python.exe)
Could NOT find PythonInterp: Found unsuitable version "2.7.11", but required is at least "3.2" (found C:/Python27/python.exe)

cmake

在我第一次编译之后,我没有找到应该包含cv2.pyd的Python目录。

当我检查opencv_dnn_BUILD_TORCH_IMPORTER时,我也会收到此错误消息。

CMake Error at C:/opencv3/sources/opencv_contrib/modules/dnn/CMakeLists.txt:57 (message):
  OPENCV_TEST_DATA_PATH environment variable was not specified

cmake error

我是否可以在opencv上找到任何为Python 2.7.x编译Windows machine的来源

1 个答案:

答案 0 :(得分:0)

通过尝试在Windows计算机上从源安装OpenCV,您将承担一项非常大的任务。我强烈建议从OpenCV网站提供的预建软件包安装 - 我也建议直接使用OpenCV 3.1而不是3.0。您可以在此处获取该安装文件:http://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.1.0/opencv-3.1.0.exe/download

话虽如此,如果您仍想从源代码安装,您可以在Windows中获取所有指示:http://docs.opencv.org/3.0-beta/doc/tutorials/introduction/windows_install/windows_install.html

祝你好运,编码愉快!