Skip to content

Instantly share code, notes, and snippets.

@zeroows zeroows/cmake_cmmd.sh
Last active Aug 19, 2018

Embed
What would you like to do?
I found a great post by Adrian Rosebrock for how to install OpenCV on Ubuntu 18.04 and for the cmake command I was able to build it using Anaconda
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH='~/Downloads/opencv/opencv_contrib-3.4.2/modules/' \
-D PYTHON3_INCLUDE_DIR='~/anaconda3/envs/tf/include/python3.6m' \
-D PYTHON_EXECUTABLE='~/anaconda3/envs/tf/bin/python' \
-D PYTHON3_LIBRARY='~/anaconda3/envs/tf/lib/libpython3.6m.so' \
-D PYTHON3_PACKAGES_PATH='~/anaconda3/envs/tf/lib/python3.6/site-packages' \
-D PYTHON3_NUMPY_INCLUDE_DIRS='~/anaconda3/envs/tf/lib/python3.6/site-packages/numpy/core/include' \
-D BUILD_EXAMPLES=ON -D BUILD_NEW_PYTHON_SUPPORT=ON ..
@zeroows

This comment has been minimized.

Copy link
Owner Author

zeroows commented Jul 21, 2018

Adrian Rosebrock great guide

Hope this will help.

BTW thanks Adrian

@anujpahade

This comment has been minimized.

Copy link

anujpahade commented Aug 19, 2018

Hello @zeroows,
I'm trying to install opencv for anaconda python 3.6.
I was able to complete 4 steps of Adrian's guide but I'm unable to find the cv2.cpython-36m-x86_64-linux-gnu.so file
in anaconda3/lib/python3.6/site-packages. Can you help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.