ImportError: No module named cv2.cv

情到浓时终转凉″ 提交于 2019-12-07 03:59:40

问题


python 3.5 and windows 10

I installed open cv using this command :

pip install opencv_python-3.1.0-cp35-cp35m-win_amd64.whl

This command in python works fine :

import cv2

But when i want to import cv2.cv :

import cv2.cv as cv

This error comes up :

import cv2.cv as cv
ImportError: No module named 'cv2.cv'; 'cv2' is not a package

So what is the problem and how can i fix it?


回答1:


as @Miki said :

cv2.cv has been removed in OpenCV3 and functions have changed

And this is OpenCV3 Documention:https://docs.opencv.org/3.0-beta/index.html



来源:https://stackoverflow.com/questions/39534496/importerror-no-module-named-cv2-cv

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