Ask Your Question

Revision history [back]

OpenCV 3.3.1 python 2.7 32bit and windows 64 bit - error

I am trying to install OpenCV for python as described in this page . I already downloaded the pre-built OpenCV 3.3.1 in my C drive and I have now installed the python 2.7., numpy and Matplotlib as per this page.

  1. I copied the "cv2.pyd" from "C:\opencv_3.3.1\build\python\2.7\x86" and pasted it to "C:\Python27\Lib\site-packages"
  2. The "import cv2" works fine, but "print( cv2.__version__ )" generates the following error

    Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> print(cv._version_ ) NameError: name 'cv' is not defined

I also have a python 3.6.2 version installed in my system. - Please let me know if I am doing something incorrectly? - Can I use Visual studio 2015 with this python version? - I am using 64 bit computer, is python 32 bit causing issues?

I have no clue, kindly suggest a solution. thank you!