Anaconda: cannot import cv2 even though opencv is installed (how to install opencv3 for python3)

老子叫甜甜 提交于 2019-12-04 01:47:15

opencv is not compatible with python 3. I had to install opencv3 for python 3. The marked answer in how could we install opencv on anaconda? explains how to install opencv(3) for anaconda:

Run the following command:

conda install -c https://conda.binstar.org/menpo opencv

I realized that opencv3 is also available now, run the following command:

conda install -c https://conda.binstar.org/menpo opencv3

Edit on Aug 18, 2016: You may like to add the "menpo" channel permanently by:

conda config --add channels menpo

And then opencv can be installed by:

conda install opencv (or opencv3)

Edit on Aug 14, 2017: "clinicalgraphics" channel provides relatively newer vtk version for very recent python3

conda install -c clinicalgraphics vtk

You can try

conda install -c menpo opencv=3

Can be too late, but i'm going to help. I had the same problem, i've created my conda env and installed everything i'll need, but when i've tryed to import cv2, i've received a message 'no module named cv2'. I've tryed install again and i've done the Linda's tips and haven't worked. So, i've seen that my conda env haven't had the cv2 installed. If it happened you, you just copy your cv2 folder to "miniconda'X'/envs/yourEnv/lib/python'X.X'/site-packages/" that will work. At least have worked to me

opencv isn't in the default conda installation repo, so you will need to install it from the channel.

conda install --channel https://conda.anaconda.org/anaconda opencv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!