简体   繁体   中英

CMake not being able to find Python Library

I am following this tutoria l to install OpenCV 3.0 and Python 2.7 but however, I am getting Cmake errors at step 8.

-- Could NOT find PythonLibs: Found unsuitable version "2.7.11", but required is exact version "2.7.13" (found /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin) -- Could NOT find PythonInterp: Found unsuitable version "2.7.13", but required is at least "3.4" (found /Users/SabrinaZuraimi/.virtualenvs/cv/bin/python) -- Could NOT find PythonInterp: Found unsuitable version "2.7.13", but required is at least "3.2" (found /Users/SabrinaZuraimi/.virtualenvs/cv/bin/python)

There is 2 versions of Python(2.7.11 and 2.7.13) in the usr/local/Cellar/Python but I don't understand why there is an error saying that i can't find 2.7.13

The command that I typed into the terminal was

 cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D PYTHON2_PACKAGES_PATH=~/.virtualenvs/cv/lib/python2.7/site-packages \
    -D PYTHON2_LIBRARY=/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin \
    -D PYTHON2_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Headers \
    -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON \
    -D BUILD_EXAMPLES=ON \
        -D INSTALL_C_EXAMPLES=OFF\
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..

I am not very familiar with cmake, and I appreciate any help that I can get.

that tutorial is out-of-date. you can try this new tutorial

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM