0

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
2
  • What does the 'workon' command do? I've never seen it before. Apr 15, 2018 at 21:47
  • 'workon' is for the python virtual environment
    – Med Nour
    Apr 21, 2018 at 0:08

2 Answers 2

1

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.

0

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.

1
  • thank you but I m using 32 Gib class 10 SD card with stretch on it so it's not the problem
    – Med Nour
    Apr 21, 2018 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.