-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install OpenCV 3.0 with Python 3.4 on OSX & Ubuntu #18
Comments
OpenCV 3 终于支持 Python 3 了啊…… |
简洁明了,感谢! |
步骤清晰,非常感谢. |
CMake Error: The source directory "/home/***" does not appear to contain CMakeLists.txt. |
boyden <notifications@github.com>于2017年9月6日 周三下午9:19写道:
CMake Error: The source directory "/home/***" does not appear to contain
CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
请问这个问题是什么原因?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#18 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AWXq-43vg6yxRB_p1iguD_seBhCDofG2ks5sfpvegaJpZM4F8usJ>
.
在你下载的源码包的目录下运行cmake的命令
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OpenCV 已经发布到了3.0版本,最近Python也发布了3.5,之前的应用都还是基于 OpenCV 2.X 和 Python 2.7。
Ubuntu 14.04 64bit
Python3.4 应该已经像2.7一样是标配了。首先需要的是
pip
:然后是
numpy
:安装依赖:
下载 OpenCV 3.0,编译安装:
测试一下:
OSX 10.10.3
开发环境比较乱,一般使用独立的虚拟环境,以往一般用virtualenv,Python3 已经内置了该功能模块:
然后是编译安装 OpenCV,和 Ubuntu 基本一致,只是一些参数路径稍有差别:
cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D PYTHON3_EXECUTABLE=/path/to/venv3/bin/python \ -D PYTHON3_PACKAGES_PATH=/path/to/venv3/lib/python3.4/site-packages \ -D PYTHON3_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib \ -D PYTHON3_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m \ -D PYTHON3_NUMPY_INCLUDE_DIRS=/Users/rainy/Projects/Vision/venv3/lib/python3.4/site-packages/numpy/core/include \ -D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D BUILD_EXAMPLES=ON \ -D BUILD_opencv_python3=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..
cmake
结果中Python 3部分如下:测试一下:
参考
The text was updated successfully, but these errors were encountered: