简体   繁体   English

如何使用anaconda3获取python3的opencv?

[英]How do I get opencv for python3 with anaconda3?

So, initially, I just had python 3.5 from the anaconda installation and all was fine. 所以,最初,我刚从anaconda安装得到python 3.5,一切都很好。 Then I was following a tutorial that suggested the use of enthought canopy, which used python 2.7. 然后我按照一个教程,建议使用enthought冠层,使用python 2.7。 After this I did a 'pip install opencv-python' and that installed the 2.7 version of the library. 在此之后我做了'pip install opencv-python'并安装了2.7版本的库。 I should note, I am on Ubunutu 16 desktop for development. 我应该注意,我在Ubunutu 16桌面上进行开发。

I cannot seem to find a way for installing opencv and possibly cv2 for python3, the version installed in my user directory. 我似乎找不到安装opencv和cv2 for python3的方法,python3是我用户目录中安装的版本。 Maybe I should remove enthought canopy. 也许我应该删除enthought冠层。 But I will still need to find the correct versions of opencv, cv2 for anaconda3. 但我仍然需要为anaconda3找到正确版本的opencv,cv2。 Thanks in advance for any help, Bruce 提前感谢任何帮助,布鲁斯

Once you have anaconda installed, try the following (as seen in this tutorial ): 安装anaconda之后,请尝试以下操作(如本教程中所示 ):

conda create -n opencv numpy scipy scikit-learn matplotlib python=3
source activate opencv
conda install -c https://conda.binstar.org/menpo opencv3

it will first create a virtual environment called opencv with the packages opencv , numpy , scipy , scikit-learn and matplotlib . 它将首先创建一个名为opencv的虚拟环境,包含opencvnumpyscipyscikit-learnmatplotlib

It works for me on Mac. 它在Mac上适用于我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM