

You want to make sure the Python(for build) and Install to folders are correct and inside your conda environment. Install to: /home/jairo/anaconda3/envs/opencv_build Python (for build): /home/jairo/anaconda3/envs/opencv_build/bin/python

install path: lib/python3.6/site-packages/cv2/python-3.6 numpy: /home/jairo/.local/lib/python3.6/site-packages/numpy/core/include (ver 1.17.3) Libraries: /home/jairo/anaconda3/envs/opencv_build/lib/libpython3.6m.so (ver 3.6.9) Interpreter: /home/jairo/anaconda3/envs/opencv_build/bin/python (ver 3.6.9) install path: lib/python2.7/dist-packages/cv2/python-2.7 numpy: /home/jairo/.local/lib/python2.7/site-packages/numpy/core/include (ver 1.16.5)

You should get something like this if everything is correct: D OPENCV_EXTRA_MODULES_PATH=$WHERE_OPENCV_CONTRIB/modules \Ĭreate the folder build inside the opencv_install: D PYTHON3_EXECUTABLE=$CONDA_PYTHON_PATH \
#CONDA INSTALL OPENCV 3.4.1 UPDATE#
Remember to update the CONDA_ENV_PATH and CONDA_PYTHON_PATH with the information above:ĬONDA_ENV_PATH=/home/jairo/anaconda3/envs/opencv_buildĬONDA_PYTHON_PATH=/home/jairo/anaconda3/envs/opencv_build/bin/python home/jairo/anaconda3/envs/opencv_build/bin/pythonĬreate the xcmake.sh file in the opencv_install folder. Is this case is /home/jairo/anaconda3/envs/opencv_build.Ĭheck the path for python executable in the active enviroment:: You need to take note of the active env location. Package cache : /home/jairo/anaconda3/pkgsĮnvs directories : /home/jairo/anaconda3/envs Populated config files : /home/jairo/.condarcīase environment : /home/jairo/anaconda3 (writable) With the environment activated:Īctive env location : /home/jairo/anaconda3/envs/opencv_build It is good to check the correct environment path before building. If you want some specific version do the checkout, otherwise skip the commands bellow: Make a folder and clone the opencv and contrib git: >conda create -n opencv_build python=3.6 numpy >sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-devĬreate and enable a new conda environment with the wanted python version and numpy: >sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev This post is based on these tutorials,which have enough information to get the build working:įirst, install the dependencies need for opencv (more information on the opencv tutotrial above): I haven't found a working conda package, and the few tutorials i found didn't workout of the box, most likely because of different versions of anaconda, ubuntu and environment.
#CONDA INSTALL OPENCV 3.4.1 CODE#
Building OpenCV form the source code can be a pain in the ass when working with Conda environment.
