Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Python import cv error on OpenCV 3.0.0 (no error for import cv2)

$
0
0
I am using a Windows 10 machine with Python 2.7.x and OpenCV 3.0.0 installed and both work fine. I followed the [official link](http://docs.opencv.org/master/d5/de5/tutorial_py_setup_in_windows.html#gsc.tab=0) for installation of the same along with numpy and matplotlib. I get an error saying: ImortError: No module named cv when I try to run the following code: import cv2 import numpy as np import cv def diceroll(): rng = cv.RNG(np.random.randint(1,10000)) print 'The outcome of the roll is:' print int(6*cv.RandReal(rng) + 1) return diceroll() I have also tried using cv2.cv instead of cv(and not use import cv) but then I get an error saying: AttributError: 'module' object has no attribute 'cv' Implying cv2 does not have cv attribute. Is there a way I can get it to work? I have just followed the link given above and not appended any python path or set environment variables for openCV

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>