从源文件构建 OpenCV 库
我已经安装了 Python 2.7
,但是当我尝试使用 CMake 2.8
生成 OpenCV 2.3.1
项目 Makefiles 时,我收到以下消息。我正在运行 Windows 7 x86 并使用 Visual Studio 10。
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
我已按照此 链接。
I have installed Python 2.7
, but when I try to generate the OpenCV 2.3.1
project Makefiles using CMake 2.8
, I get the following message. I am running Windows 7 x86 and using Visual Studio 10.
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
I have followed the guide provided at this link.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,这对我也有用。
检查高级,然后手动设置三个变量的值。
就我而言:
在 Windows 上使用 PythonPortable 进行测试。 (因此,无需安装)
Yes, this also worked for me.
Check advanced, then manually set the values for the three variables.
In my case:
Tested with PythonPortable on Windows. (so, no installation required)
你是否在正常位置安装了Python(Windows上为c:\Python2.7)
使用Cmake-gui选择高级,它将允许你直接设置所有值
Did you install Python in the normal place ( c:\Python2.7 on windows)
Use the Cmake-gui select advanced and it will allow you to set all the values directly
检查已安装的 Python 的体系结构,例如,在我的例子中,我安装了 Python x86_64 包,但 Cmake 正在寻找 x86。所以我相信这个Cmake错误消息有很大的改进潜力。
Check the architecture of your installed Python, in my case for example I had Python x86_64 package installed but Cmake was looking for x86. So I believe this Cmake error message has a great potential of improvement.