When following the below tutorial:
brew install python3 pip3 install numpy brew install cmake git clone --depth=1 https://github.com/Itseez/opencv.git cd opencv mkdir build cd build
note: in the next line, adjust paths to point to the correct python version cmake -DBUILD_opencv_python3=YES -DBUILD_opencv_python2=NO
-DINSTALL_PYTHON_EXAMPLES=YES -DPYTHON3_EXECUTABLE=/usr/local/bin/python3 -DPYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/include/python3.5m/ -DPYTHON3_LIBRARY=/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib -DPYTHON3_NUMPY_INCLUDE_DIRS=/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/numpy/core/include/ -DPYTHON3_PACKAGES_PATH=/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/ .. make -j8 make install python3 -c "import cv2; print(cv2.version)"
I get this error for line 10 $ make -j8
:
[ 39%] Built target opencv_shape
In file included from /Users/mona/Downloads/opencv/modules/videoio/src/cap_ffmpeg.cpp:47:
In file included from /Users/mona/Downloads/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:65:
/Users/mona/Downloads/opencv/modules/videoio/src/ffmpeg_codecs.hpp:77:12: fatal error:
'libavformat/avformat.h' file not found
#include <libavformat/avformat.h>
^
1 error generated.
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 40%] Linking CXX shared library ../../lib/libopencv_photo.dylib
[ 40%] Built target opencv_photo
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [all] Error 2
Monas-MacBook-Pro:build mona$
Why is this tutorial not passing on my OSX?
note: in the next line, adjust paths to point to the correct python version
? – usr1234567