Build files have been written to: /home/james/opencv/build Python (for build): /home/james/anaconda3/bin/python packages path: /home/james/anaconda3/lib/python3.7 numpy: /home/james/anaconda3/lib/python3.7/site-packages/numpy/core/include (ver 1.15.1) Libraries: /home/james/anaconda3/lib/lib3.7m.so (ver 3.7.0) Interpreter: /home/james/anaconda3/bin/python3 (ver 3.7) Include path: /home/james/opencv/3rdparty/include/opencl/1.2 at: /home/james/opencv/build/3rdparty/ippicv/ippicv_lnx PNG: /home/james/anaconda3/lib/libpng.so (ver 1.6.34) JPEG: /home/james/anaconda3/lib/libjpeg.so (ver 90) ZLib: /home/james/anaconda3/lib/libz.so (ver 1.2.11)
![conda install opencv anaconda conda install opencv anaconda](https://static.packt-cdn.com/products/9781789954555/graphics/assets/0439ec88-b7e8-43e9-9e37-a1a341bf0d3f.png)
#Conda install opencv anaconda code
Do not close and reopen the terminal executing these code blocks).īefore proceeding, double check that you are in the build directory we made, and that your directory structure looks like this. The path variables saved in this code block will be used in the next block, thus it’s important that you are using a single terminal session for all these steps (i.e. Otherwise, double check that the anaconda path and python version you supplied in lines 2-3 are correct. If you recieved the message Paths verified, you can go ahead and configure the build!, continue to the next step. # Specify directories of anaconda and python libraries # anaconda = "/home/james/anaconda3" pythonVersion = "3.7" # Check that user specified directories exist # pass = true # Check Exec pyExec = " $ does not exist" pass = falseĮcho "Paths verified, you can go ahead and configure the build" fi I’m just running a single call to apt covering all dependancies I’ve seen mentioned on other guides, or have figured out myself from build errors. DependanciesĪs always, when building on linux I take a shotgun approach to dependancies. The following represents a streamlined version of this guide. I’ve tried to generalize my code as much as possible so that you can use this with any version of opencv and anaconda, so watch out for steps where I’m explicitly asking you to type in your opencv and python versions.
![conda install opencv anaconda conda install opencv anaconda](https://linuxpip.org/wp-content/uploads/2021/10/INSTALL-OPENCV-PIP-CONDA.jpg)
We’ll set up our build config to that opencv links with our version of python bundled within anaconda in addition to enabling ffmpeg integration so we can read/write videos.
#Conda install opencv anaconda how to
There is no easy way around this as far as I know, so here I’m going to cover how to go about building opencv from source. This means that you can’t read or write videos using these versions of opencv. If you’re here, you’ve probably discovered that the versions of opencv available on the Anaconda cloud (via the conda package manager) don’t have ffmpeg codecs compiled within them.