illegal instruction when importing opencv into python compiled opencv3 for python 3 by using these commands
$ cd ~/opencv-3.3.0/ $ mkdir build $ cd build $ cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.3.0/modules \ -D ENABLE_NEON=ON \ -D ENABLE_VFPV3=ON \ -D BUILD_TESTS=OFF \ -D INSTALL_PYTHON_EXAMPLES=OFF \ -D BUILD_EXAMPLES=OFF .. i had set environment variable by these commands $sudo pip install virtualenv virtualenvwrapper $ sudo rm -rf ~/.cache/pip
and appended the following code on my ~/.profile file
# virtualenv and virtualenvwrapper export WORKON_HOME=$HOME/.virtualenvs export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 source /usr/local/bin/virtualenvwrapper.sh
I was trying to install optimized opencv for python in raspberry pi2. Instructed from the following website https://www.pyimagesearch.com/2017/10/09/optimizing-opencv-on-the-raspberry-pi/. But when I run the command import cv2 in python it shows illegal instruction error. What to do?