简体   繁体   中英

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. Then I was following a tutorial that suggested the use of enthought canopy, which used python 2.7. After this I did a 'pip install opencv-python' and that installed the 2.7 version of the library. I should note, I am on Ubunutu 16 desktop for development.

I cannot seem to find a way for installing opencv and possibly cv2 for python3, the version installed in my user directory. Maybe I should remove enthought canopy. But I will still need to find the correct versions of opencv, cv2 for anaconda3. Thanks in advance for any help, Bruce

Once you have anaconda installed, try the following (as seen in this tutorial ):

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 .

It works for me on Mac.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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