I am using ubuntu 14.04, and have anaconda python installed. I used conda install opencv and conda install cv2 to install opencv. However I am unable to use the VideoCapture
I believe I had the same problem. I fixed it by adding lib
folder to the PATH
. For example,
export PATH="/home/iori/anaconda3/bin:$PATH"
export PATH="/home/iori/anaconda3/lib:$PATH"
My .bachrc
now has this 2nd line. The first line is added by anaconda and source activate
command switches this bin
folder but I think it does not take care of lib
folder which I found annoying because that means opencv cannot find the lib_opencv_*.so
files in there and of course cv2.VideoCapture fails.
The above example will fix the problem for the default conda env. For other envs, I still need to manually add lib
folder to the PATH
. So, I want to know how to customize source activate
command to do this automatically for me...