Install OpenCV Ubuntu undefined

After installing OpenCV on Ubuntu, I run python code import cv2and I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python2.7/dist-packages/cv2.so: undefined symbol: _ZTIN2cv12_OutputArrayE

This is how I installed OpenCV.

mkdir opencv
cd opencv
git clone git://github.com/Itseez/opencv.git
mkdir build
cd build
ccmake ..
make
sudo make install

What can I do?

+4
source share
1 answer

You can try to get the latest release tag, not the HEAD code, for example:

git clone https://github.com/Itseez/opencv.git
cd opencv && git checkout 3.2.0
0
source

Source: https://habr.com/ru/post/1612127/


All Articles