系统环境已经安装过OpenCV,在conda环境中报错:No module named 'cv2

Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'

解决办法:

在conda环境下再安装一下喽

OpenCV3:

conda install --channel https://conda.anaconda.org/menpo opencv3

OpenCV:

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

 

Logo

更多推荐