In openSUSE I can install openCV with zypper:
sudo zypper install opencv
But it doesn’t work:
artin@linux-vb3j:~>
martin@linux-vb3j:~>
martin@linux-vb3j:~> python
Python 2.7.13 (default, Jan 03 2017, 17:41:54) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv2
>>> import cv3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv3
>>> exit()
martin@linux-vb3j:~> python3
Python 3.4.6 (default, Mar 22 2017, 12:26:13) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'cv'
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'cv2'
>>> import cv3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'cv3'
linux-vb3j:~/Documents/C> g++ opencv_test.cpp
opencv_test.cpp:1:10: warning: missing terminating " character [enabled by default]
#include "opencv2/core.hpp'
^
opencv_test.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
martin@linux-vb3j:~/Documents/C>
The problem is that I can’t actually find it as well:
martin@linux-vb3j:~/Documents/C> whereis opencv
opencv:
martin@linux-vb3j:~/Documents/C> opencv
If 'opencv' is not a typo you can use command-not-found to lookup the package that contains i
t, like this:
cnf opencv
martin@linux-vb3j:~/Documents/C> type opencv
bash: type: opencv: not found
martin@linux-vb3j:~/Documents/C> man opencv
No manual entry for opencv
martin@linux-vb3j:~/Documents/C> zypper install opencv
Root privileges are required for installing or uninstalling packages.
martin@linux-vb3j:~/Documents/C> sudo zypper install opencv
[sudo] password for root:
Retrieving repository 'openSUSE-Leap-42.3-Update' metadata ............................[done]
Building repository 'openSUSE-Leap-42.3-Update' cache .................................[done]
Loading repository data...
Reading installed packages...
'opencv' is already installed.
No update candidate for 'opencv-3.1.0-3.25.x86_64'. The highest available version is already
installed.
Resolving package dependencies...
Nothing to do.