I would like to keep everything contained within the virtualenv. Is this possible with OpenCV? I\'m fine with building from scratch, do I just need to setup the virtualenv
This is possible by passing the python executable as an argument to cmake. I would also suggest then to use a local install folder, so you don't need sudo at all. And then, if make install doesn't ask you for sudo permissions, it is probably targetting your virtualenv python .
Open cmakelists.txt with cmake-gui to see the python variables. It would also probably give an error if you don't have numpy in your virtualenv, so that way you know it's choosing the right python. This would also work with independent of python version, as it is built specifically for your python executable