I am trying to make a python environment separate from the system one (using virtualenv) in a directory which is not under /home, because I need to use it to build other software that has to be accessible to multiple users. I can create and activate the virtualenv all right, but when I sudo
some command (for example to make or compile other software), it is the system python that is used (I can tell because of the available modules).
Since on Ubuntu it is not a good thing to use the root user, is there a way to tell sudo
to use a virtualenv? Or maybe this is not the correct approach, and I should make a completely new python installation?
I am using the 64bit version of Ubuntu 12.04 (and python 2.7).