0

I am trying to install python on my system but facing some issues.

I have installed OpenCV 3.0.0 for Windows x64 bit system and now i am trying to install python 2.7.5 on my system and i also have installed numpy 1.7.1.

Then i copied 'cv2.pyd' from my OpenCV folder to python folder, now in order to configure them i have to import cv2 file but this error is coming when i try that.

enter image description here

can anyone help me in this i am new in this. Shall i try to work with latest version of python and numpy for my windows x64 system?

Thanks

2
  • Your numpy version is not up to date but not the issue, how did you install opencv? Also where did you copy it to exactly? Commented Jul 2, 2015 at 17:48
  • i copied numpy to this location "C:\Python27\Lib\site-packages"
    – shivam
    Commented Jul 4, 2015 at 3:48

2 Answers 2

1

Here's a complete way of installing OpenCV with Python

  1. Download: Python-2.7.11 from https://www.python.org/downloads numpy-1.8.0-win32-superpack-python2.7.exe from https://sourceforge.net/projects/numpy/files/NumPy/1.8.0/ matplotlib-1.3.0.win32-py2.7.exe from https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.3.0/
  2. Install Python-2.7.11
  3. Copy the .exe of numpy, matplotlib and opencv and paste them in C:\Python27
  4. Run numpy-1.8.0-win32-superpack-python2.7.exe
  5. Run matplotlib-1.3.0.win32-py2.7.exe
  6. In Python Idle, execute import numpy to ensure that numpy is correctly installed.
  7. Run opencv-3.1.0.exe
  8. Goto opencv/build/python/2.7/x86 folder. Copy cv2.pyd to C:/Python27/lib/site-packeges.
  9. copy ffmpeg zip folder to C:\
  10. Extract ffmpeg in C:\ffmpeg
  11. Copy extracted ffmpeg folder to C:\Python27
  12. Locate opencv_ffmpeg310_64.dll and opencv_ffmpeg310.dll and copy these at C:\Python27 (Most likely opencv_ffmpeg310.dll is more important than opencv_ffmpeg310_64.dll but not sure. So copy both.)
  13. Go to system Variables and set path C:\Python27; C:\Python27\ffmpeg\bin
1
  • Make sure to add path C:\Python27; C:\Python27\ffmpeg\bin to the system variables, not to replace it! Commented Aug 7, 2016 at 9:34
0

After lots of research and struggle i found out what the issue was.

My system is Windows x64 bit but this python and numpy most of the times don't work well with Windows x64 bit systems.

So i first i configured my OpenCV as x86, though my system is x64 bit. After that i download 32 bit python and numpy and configured the same with OpenCV and it worked very well.

Thanks !

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.