简体   繁体   中英

Anaconda Jupyter Python2.7 "ImportError: No module named opencv"

I installed Anaconda and install Jupyter Notebook in Anaconda Navigator by following this tutorial: Install Anaconda on Mac , and then I set up a new environment called "Computer Vision" the programming language is Python 2.7, and then I installed libopencv, opencv, py-opencv. I want to test if OpenCV has been installed successfully, so I only write one line code

import opencv

And the error says

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-140d3f9c9adb> in <module>()
----> 1 import opencv

ImportError: No module named opencv

I do not understand why this happens, I am sure I launch Jupyter Notebook after I installed the OpenCV module. I also try to use Python3.7 but it still not work.

Thank you for taking care of this question.

Opencv is imported via the line import cv2 , instead of import opencv . This is true in both Python 2 and 3.

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