-
update
cmake
and install deps as this said. -
run
cmake
cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=~/.pyenv/versions/3.5.0/usr/local/ \ -D INSTALL_C_EXAMPLES=OFF \ -D BUILD_NEW_PYTHON_SUPPORT=ON \ -D BUILD_opencv_python3=ON \ -D BUILD_opencv_legacy=OFF \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/tmp/opencv_contrib/modules \ -D BUILD_EXAMPLES=ON \ -D PYTHON_EXECUTABLE=~/.pyenv/versions/3.5.0/bin/python \ -D PYTHON_LIBRARY=~/.pyenv/versions/3.5.0/lib/libpython3.5m.a \ -D PYTHON_INCLUDE_DIR=~/.pyenv/versions/3.5.0/include/python3.5m \ -D PYTHON_INCLUDE_DIRS=~/.pyenv/versions/3.5.0/include/python3.5m \ -D PYTHON_INCLUDE_DIRS2=~/.pyenv/versions/3.5.0/include/python3.5m \ -D INCLUDE_DIRS=~/.pyenv/versions/3.5.0/include/python3.5m \ -D INCLUDE_DIRS2=~/.pyenv/versions/3.5.0/include/python3.5m \ -D PYTHON_PACKAGES_PATH=~/.pyenv/versions/3.5.0/lib/python3.5/site-packages \ -D PYTHON_NUMPY_INCLUDE_DIR=~/.pyenv/versions/3.5.0/lib/python3.5/site-packages/numpy/core/include ..
Don't forget to change
OPENCV_EXTRA_MODULES_PATH
-
make
-
make install
-
[~/.pyenv/versions/3.5.0/lib/python3.5/site-packages]$ ln -s ~/.pyenv/versions/3.5.0/usr/local/lib/python3.5/site-packages/cv2.cpython-35m-x86_64-linux-gnu.so cv2.so
-
🎉
Last active
October 30, 2022 03:26
-
-
Save pohmelie/cf4eda5df24303325b16 to your computer and use it in GitHub Desktop.
Install opencv3 for python 3.5.0 with pyenv on ubuntu 14.04
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment