1
votes

I am using PyCharm community version 2017.3.1, and Python 2.7.1. I tried installing opencv through PyCharm but it kept giving me an error.

File "C:/Users/user/PycharmProjects/cameratest/cameratest.py", line 2, in import cv2 ImportError: DLL load failed: %1 is not a valid Win32 application.

I downloaded the opencv executable file and tried moving it to my Python 2.7 file but it would still not work, and I tried following the answer here but to no avail.

1
what do you mean by: I tried installing opencv through PyCharm? do you mean importing it? Also - is the correct python interpreter being used in PyCharmMattR
I installed it using the project interpreter in PyCharm, and I was using the correct Python interpreterDanyah

1 Answers

0
votes

Add the python executable to the windows directory path if operating in windows.

Copy where the python folder is located then

on windows button search path

click "edit the system environment variables"-> environment variables->path

Go to end, and type ";" and paste the windows directory path.

Log off and log back in. Then try executing program.