I had the same problem, I couldn't get OpenCV installed in virtualenv using pip in the proper way. However this is what I have done:
- Install OpenCV and Python using Homebrew (and all depenencies such as numpy)
- Then I installed virtualenv and create a new virtual environment with numpy.
Finally what I did was symlinked the folder from the "normal" python installation to the 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
So when I launch the virtualenv I have cv2 available:
(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'>
By the way I am using Python 2.7.3, OpenCV 2.4.4a, virtualenv 1.10.1 on MacOSX 10.8.5