How to compile OpenCV for python 3.4 on Debian Jessie 8.3
De Centre de Ressources Numériques - Labomedia
Révision de 30 octobre 2017 à 18:53 par Serge (discussion | contributions)
Sommaire
“Why should we make it simple when we can make it complicated ?”
Without !!!!!!!!!!!!!!!!!!!! virtualenv !!!!!!!!!!!!!!!!!!!!
Debian 8.3 and python 3.4
It's ok too with another python, see above.
Ressources
http://remananr.com/Blog/opencv-in-python3/
Dependancy
sudo apt-get install libopencv-dev python-opencv
sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt install python3-dev libpython3.4-dev python3-numpy
python3.4-config --includes
For another day version, change 3.4 to yours.
Download sources
In your directory "projects", open a terminal:
git clone https://github.com/opencv/opencv.git
It's big, so "don't warry, be happy !
Personnal hack
In CMakeLists.txt, to avoid incomprehensible error,
comment lines 10 to 15
Waouh !!!
Compilation
In the previous terminal,
cd opencv
mkdir build
cd build
Use CmakeGUI Qt, instead of command line cmake .... patati ... patata .........
voir http://implab.ce.unipr.it/?p=21
Set:
- Sources Directory
- Destination Directory
and clic on Generate ...
make -j8
sudo make install
" Better luck next time, slug-heads. " Bang. Gone. I am invincible !
" Bonne chance pour une prochaine fois, tas de nullards ! " Boum ! Envoyé ! Je suis bien l'invincible !