- Install OpenCV in Ubuntu (this link might point an old one, please open the latest one)
- Ubuntu+pyenv-virtualenv下のpython3にOpenCVの最新版をインストールした話
Created
February 15, 2021 16:28
-
-
Save puhitaku/b8cbb8a74cafe5a1c4562c866bc85f3f to your computer and use it in GitHub Desktop.
Install OpenCV on Debian w/ pyenv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ROOT=~/.pyenv/versions/3.9.1 | |
VENV_ROOT=$ROOT | |
cmake \ | |
-D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=$VENV_ROOT \ | |
-D INSTALL_C_EXAMPLES=OFF \ | |
-D BUILD_NEW_PYTHON_SUPPORT=ON \ | |
-D BUILD_opencv_java=OFF \ | |
-D BUILD_opencv_python2=OFF \ | |
-D BUILD_opencv_python3=ON \ | |
-D BUILD_opencv_legacy=OFF \ | |
-D INSTALL_PYTHON_EXAMPLES=ON \ | |
-D BUILD_EXAMPLES=ON \ | |
-D PYTHON3_EXECUTABLE=$ROOT/bin/python \ | |
-D PYTHON_LIBRARY=$ROOT/lib/libpython3.9m.a \ | |
-D PYTHON_INCLUDE_DIR=$ROOT/include/python3.9m \ | |
-D PYTHON_INCLUDE_DIRS=$ROOT/include/python3.9m \ | |
-D PYTHON_INCLUDE_DIRS2=$ROOT/include/python3.9m \ | |
-D INCLUDE_DIRS=$ROOT/include/python3.9m \ | |
-D INCLUDE_DIRS2=$ROOT/include/python3.9m \ | |
-D PYTHON3_PACKAGES_PATH=$VENV_ROOT/lib/python3.9/site-packages \ | |
-D PYTHON3_NUMPY_INCLUDE_DIRS=$VENV_ROOT/lib/python3.9/site-packages/numpy/core/include \ | |
.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment