Compile OpenCV with anaconda python

asked 2018-04-19 08:24:29 -0500

khurram gravatar image

updated 2018-04-19 08:30:53 -0500

Hello, I am trying to compile opencv with anaconda python support (I need to use opencv in python). The pre-built packages available from conda channels (e.g. intel or conda-forge) are not usable for me as I require to link the opencv with intel python distribution (installed via conda), with own custom compiled ffmpeg as well as I need cuda support.

I am using cmake-gui to configure opencv build environment. The problem I am facing is Cmake is unable to detect anaconda python on its own (given it is installed at the default conda installation path /home/user/minicaonda). If I manually add paths to anaconda as given at the following link the Python Libraries are still not detected. https://groups.google.com/a/continuum...

As a result cmake configure log shows that python2 & python3 are unavailable. If I run make as it is the cv2.so (or cv2.cpython*.so) is not built.

Can someone guide me on how to resolve this issue?

edit retag flag offensive close merge delete

Comments

"as well as I need cuda support." -- not possible from opencv's python wrappers at all.

berak gravatar imageberak ( 2018-04-19 08:28:03 -0500 )edit

It's possible with Cython https://github.com/bafu/cv2cuda but I've also encountered the same problem as OP trying to build OCV with an Anaconda python.

4xle gravatar image4xle ( 2018-10-25 17:29:37 -0500 )edit