Hi everyone I hope someone could help solve this issue,I'm trying to install openCV 3.3.0 with python 3.5 on the raspberry pi 3 for the second time ( first time I got no module named cv2 ) but this time I didn't even got there , it seems like I'm blocked here with the error of 'segmentation fault' and i can't understand why ! this is what I typed in the terminal
pi@raspberrypi:~ $ source ~/.profile
pi@raspberrypi:~ $ workon cv
(cv) pi@raspberrypi:~ $ cd opencv-3.3.0
(cv) pi@raspberrypi:~/opencv-3.3.0 $ cd build
(cv) pi@raspberrypi:~/opencv-3.3.0/build $ ls
(cv) pi@raspberrypi:~/opencv-3.3.0/build $ cmake -DCMAKE_BUILD_TYPE=RELEASE\
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.3.0/modules \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D PYTHON_EXECUTABLE=/home/pi/.virtualenvs/cv/bin/python3.5 \
-D PYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.5m.so \
-D PYTHON_NUMPY_INCLUDE_DIR=/home/pi/.virtualenvs/cv/lib/python3.5/site-
packages/numpy/core/include \
-D PYTHON_PACKAGES_PATH=/home/pi/.virtualenvs/cv/lib/python3.5/site-
packages \
-D INSTALL_C_EXAMPLES=OFF \
-D BUILD_EXAMPLES=ON ..
Segmentation fault
-
What does the 'workon' command do? I've never seen it before.John Hawthorne– John Hawthorne2018年04月15日 21:47:41 +00:00Commented Apr 15, 2018 at 21:47
-
'workon' is for the python virtual environmentMed Nour– Med Nour2018年04月21日 00:08:45 +00:00Commented Apr 21, 2018 at 0:08
2 Answers 2
Could be running out of memory. Use htop to view cpu and ram usage when running command. Configure your RPI to add swap memory if needed.
I did encounter this same scenario.
It was fixed when I change the uSD card, from 8 GiB
to 16 GiB Class 10
then re-image the new uSD card using latest raspbian.
-
thank you but I m using 32 Gib class 10 SD card with stretch on it so it's not the problemMed Nour– Med Nour2018年04月21日 00:07:18 +00:00Commented Apr 21, 2018 at 0:07