Skip to content

Install opencv for python 3.4

Matt edited this page Mar 4, 2018 · 3 revisions

You will want to take your micro sd card out of pi zero w and put it in a pi 3 for compiling opencv it will save you a lot of time

sudo apt-get update

sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

sudo apt-get install python3.4-dev

mkdir OpenCV-tmp

cd OpenCV-tmp

git clone https://github.com/Itseez/opencv.git

mv opencv opencv-3

mkdir build

cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ../opencv-3

make -j $(nproc --all)

sudo make install

after install type python3 into your terminal

in the interaction window type import cv2 followed by enter

you should not get any errors

Clone this wiki locally