I had the same problem, I could not get OpenCV installed in virtualenv using pip correctly. However, this is what I did:
- OpenCV Python Homebrew ( , numpy)
- virtualenv numpy.
, , , "" python virtualenv:
$ ln -s /usr/local/lib/python2.7/site-packages/cv2.so /usr/local/lib/python2.7/site-packages/cv.py ~/envs/lib/python2.7/site-packages
, virtualenv, cv2:
(virtualenv)localhost:~ juan$ python
Python 2.7.3 (default, Mar 18 2013, 11:14:52)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2
<module 'cv2' from '/Users/juan/envs/lib/python2.7/site-packages/cv2.so'>
, Python 2.7.3, OpenCV 2.4.4a, virtualenv 1.10.1 MacOSX 10.8.5