Today I installed opencv 2.4.4 to Ubuntu 12.10
But import cv2 not works.
root@-:~# python
Python 2.7.3 (default, Sep 26 2012, 21:53:58)
[GCC 4.7.2]
I have this problem in my OS X El Capitan.
I followed the instructions mentioned in this tutorial. Didn't get a successful working install and had the above error of missing cv2.so file in the required folders mentioned and at the python prompt.
Finally figured that using the virtual python setup was causing trouble. So uninstalled with
pip install virtualenv virtualenvwrapper
Then ran
brew link opencv
which threw errors.
And then followed below steps to resolve the issue.
First run
brew link opencv
If it gives an error, try for an automated diagnosis
brew doctor
brew doctor gives a list of problems that could be leading to errors in installation process.
To fix problems in case of conflicting files, run to get a list of all actions which will be performed by overwrite without actually performing them.
To list all files that would be deleted:
brew link --overwrite --dry-run opencv
followed by this run which will execute the overwrite, assuming you feel that the actions performed by overwrite will take your system to a more stable state.
To force the link and overwrite all conflicting files:
brew link --overwrite opencv
This tutorial is a simpler alternative.