Skip to content
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

cmake cannot find python2_libraries #1

Open
tymiao1220 opened this issue Dec 2, 2016 · 0 comments
Open

cmake cannot find python2_libraries #1

tymiao1220 opened this issue Dec 2, 2016 · 0 comments

Comments

@tymiao1220
Copy link
Owner

System Mac 10.12 Sierra
Cmake 3.7

I am following http://www.pyimagesearch.com/2016/11/28/macos-install-opencv-3-and-python-2-7/, to install python2.7 with opencv, but I come across a issue which Is when I tried to configure them via cmake, it shows like:
-- Python 2:
-- Interpreter: /Users/tianyimiao/.virtualenvs/cv/bin/python (ver 2.7.10)
-- Libraries: NO
-- numpy: /Users/tianyimiao/.virtualenvs/cv/lib/python2.7/site-packages/numpy/core/include (ver 1.11.2)
-- packages path: lib/python2.7/site-packages

The Cmake Library path I use is:
cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules
-D PYTHON2_LIBRARY=/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib
-D PYTHON2_INCLUDE_DIR=/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/include/python2.7
-D PYTHON2_EXECUTABLE=$VIRTUAL_ENV/bin/python
-D BUILD_opencv_python2=ON
-D BUILD_opencv_python3=OFF
-D INSTALL_PYTHON_EXAMPLES=ON
-D INSTALL_C_EXAMPLES=OFF
-D BUILD_EXAMPLES=ON ..

The libraries cannot be found all the time, and I have tried to delete and recreate build several times and it does not work, and the specified Library path I used is right coz I can find that 'libpython2.7.dylib' file by that path.

I am new at Mac and python as well, so really want to know the reason and how to fix that.
I appreciate for any help! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant