Boris
Boris

Reputation: 213

DLL load failed : in installing opencv2?

Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 15:51:26) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: %1 is not a valid Win32 application.

I am trying to install open cv on python but this message shows up. should I download opencv of 32 bit is this the case?

Upvotes: 1

Views: 815

Answers (2)

Yuresh Karunanayake
Yuresh Karunanayake

Reputation: 567

The problem is with incompatible lib.numpy is (mostly) compatible with 32bit. So install

  1. Python (32bit)
  2. Numpy
  3. OpenCV(32 bit)

Python 2.7 is only compatible with OpenCV2

Doesn't matter if you have a 64bit machine, 32-bit software can be run on a 64-bit Operating System.

Upvotes: 3

Boris
Boris

Reputation: 213

I used pip install opencv-python it worked for me https://pypi.python.org/pypi/opencv-python

Upvotes: 1

Related Questions