Building OpenCV for Python -
i'm using this: http://docs.opencv.org/3.1.0/d7/d9f/tutorial_linux_install.html build opencv on ununtu 16lts python 3. on step 4 in building opencv source using cmake i'm stuck typing in right parameters. you, please check variants, because find folders , no files suggested extensions. also, shall type flag -d
before each param?
-d python3_executable=$home/anaconda3/bin -d python_include_dir=/usr/include/python3.5 -d python_include_dir2=/usr/include/x86_64-linux-gnu/python3.5m -d python_library=/usr/lib/x86_64-linux-gnu/libpython3.5m.a -d python3_numpy_include_dirs= dont have similar path in tutorial, have "numpy" folder in /usr/include/python3.5! should do?
also, shall write in:
-d cmake_install_prefix
opencv_extra_modules_path
(in tutrial(previus step), o downloaded opencv-contrib. should type in:opencv_extra_modules_path=/home/vladislav/opencv/opencv_contrib
build_docs
build_examples
error: when run told in tutorial, got mistakes this: cmake error: source directory "/home/vladislav/opencv/build/python_library=/usr/lib/x86_64-linux-gnu/libpython3.5m.so" not exist.
that's example of working cmake params (ubuntu 16.04, latest opencv, python 3.5), need adjust paths own.
cmake -d cmake_build_type=release \ -d python3_executable=/usr/bin/python3.5 \ -d python3_include_dir=/usr/include/python3.5 \ -d python3_library=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/libpython3.5.so \ -d python3_numpy_include_dis=/usr/local/lib/python3.5/dist-packages/numpy/core/include \ -d python3_packages_path=/usr/local/lib/python3.5/dist-packages \ -d cmake_install_prefix=/usr/local \ -d opencv_extra_modules_path=../../opencv_contrib/modules \ -d build_examples=on ..
in case opencv_contrib in same folder opencv cmake command starts build folder (mkdir build
in opencv folder) in case need jump dirs , important: refer opencv_contrib/modules folder
sometimes it's little bit clearer use cmake-gui
sudo apt install cmake-gui
Comments
Post a Comment