virtualenv上のpipではopencvをインストールできなかったが Is it possible to run opencv (python binding) from a virtualenv? - Stack Overflow に I found the solution was that I had to copy over cv2.so and cv.py to the directory running the virtualenv, then pip install numpy. To do this on Ubuntu 12.04 I used. とあった. 仮想環境の作成 $ mkvirtualenv --python /opt/python2.7.11/bin/python2.7 --no-site-packages opencv OpenCVのインストール $