mxn
mxn

Reputation: 53

OpenCV3 installation with Python3.4 on Windows 8.1 (64 bits)

I have successfully installed the 64 bit version of Python 3.4.3 on my Intel based core i7 machine which is running Windows 8.1. I have also successfully installed the 64 bit version of numpy and run the numpy.test() and things look fine. I have installed/extracted *opencv3.0 *and have copied the file cv2.pyd (from lib/opencv/build/python/2.7/x64) to python/Lib/site-packages. When I run print (sys.path), it correctly finds the C:\Python34\lib\site-packages where cv2.pyd resides. I have two concerns:

(i) Why the folder is called 2.7? I read many article here that opencv3 can run with python 3.x

(ii) Why the file is still called cv2.pyd and not cv3?

Either way when I import cv2 I get this error:

Traceback (most recent call last): File "", line 1, in import cv2 ImportError: DLL load failed: The specified module could not be found.

I have read many similar Q&As here for similar situations but not exactly for my setup. Any help or suggestions are appreciated. But please do not say uninstall everything and re-install 32 bits -- I need the 64!

Upvotes: 1

Views: 882

Answers (2)

Ninga
Ninga

Reputation: 699

Whether or not you install manually or from Gohlke's whl package, I found the need to create/edit the file cv.py in site_packages as follows:

import cv2 as cv

Upvotes: 0

otterb
otterb

Reputation: 2710

this question should answer most of your questions: How do I install a Python package with a .whl file?

cv2 is just a newer API version of python wrapper of opencv C++ library. So cv2 is what we need to install and there is no cv3. But the official installer may not have python34 build for cv2.pyd. so either build it from source or use Gohlke's whl package (recommended!!).

Upvotes: 1

Related Questions