2

I have windows 7 x64 and python 3.4. I try to use cv2 module:

import numpy as np
import cv2

img = cv2.imread('messi5.jpg',0)

As I know, there is no way to use opencv 2 with python 3.4. Therefore, I downloaded opencv 3 beta. But I don't understand how to use this stuff for my purpose. Folder ~\opencv\build\python\ contains python 2.7 folder, but there is not python 3.4 folder.

How to solve my task?


Update (06.06.2015).

OpenCV 3 has been released. You can directly download it from official site.

Community
  • 1
  • 1
Denis
  • 3,595
  • 12
  • 52
  • 86

1 Answers1

1

you need to build it from source using cmake. Follow the instructions of standard install procedure link, you will find OPENCVDIR/build/install/python/x64(or86)/3.4/cv.pyd. Copy this file and all the .dll files to the python site-packges dir, I was able to "import cv2"

XWen
  • 361
  • 1
  • 2
  • 10
  • Following your suggestion, I'm trying to build OpenCV 3.0.0-beta from source. However the tutorial is a bit outdated and I run into some problems. Could you take a look at: http://stackoverflow.com/questions/29747195/building-opencv-3-0-0-beta-windows-python-3-4 ? – NumesSanguis Apr 20 '15 at 12:00