Ask Your Question

pcp16's profile - activity

2015-02-19 10:59:30 -0600 received badge  Necromancer (source)
2014-11-19 13:45:31 -0600 answered a question install opencv for anaconda ipython

I've just gone through the whole process, therefore, I find the previously given answer a bit too vague (sorry, no offence).

You will need to compile OpenCV for yourself (not daunting, I hope). And you will need to change the variable that was pointed out before, but not just this variable (PYTHON_PACKAGES_PATH) but also all those referring to PYTHON paths (starting by PYTHON2_ or PYTHON3_), for instance:


In all of them, you'll need to specify the path to the anaconda installation, not the system-installed Python interpreter (CMake, the tool used to compile OpenCV might automatically find either, or even a mixture!).

I would recommend you follow a step-by-step guide if you are not familiar with the compiling process. There are plenty, for Fedora 20, which is what I am using, you can find:

Even if you don't have Fedora, it might be useful to check all of the CMake variables they set, since this is made to reduce the compilation time, and avoid unnecessary modules that the Python module 'cv2' might not be able to use anyway).

After the compilation, I got an IMPORT_ERROR in Python when doing 'import cv2'. In my case, this was due to the dynamic libraries of opencv trying to reach the wrong version of ''. So, please make sure you rename your "" under the Anaconda directory to something like '', so that your libopencv*.so files can find the 'proper' one installed by the system. This shouldn't break Anaconda. See the following post for details:!topic/anaconda/rX_c12a7Sps

I hope this helps!