Wednesday, February 10, 2016

Building opencv 3.1 under Manjaro linux

As previously, opencv was build using cmake-gui to set-up the build options. CUDA 7.5 was installed from manjaro files repository with octopi files manager.

Everything went fine during compilation with: make -j4 followed by sudo make install.

However when importing opencv from a python console, things went wrong:

$ python2
Python 2.7.11 (default, Dec  6 2015, 15:43:46)
[GCC 5.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named cv2


I didn't met this problem under Ubuntu but the problem is known. Specifying the path to cv2 from python allows the lib to be loaded:
 
>>> import sys

>>>sys.path.append('/usr/local/lib/python2.7/site-packages')
>>> import cv2
>>> cv2.__version__
'3.1.0'


No comments: