I am under the impression that using the --system-site-packages flag with virtualenv will allow the virtual environment to use the already installed system packages. However
I'm not sure what went wrong when you created the virtualenv
but clearly it does not have the expected values in its sys.path
. If you use virtualenv x --system-site-packages
to create virtual environment x
, you should see the parent Python's site-packages
directory on sys.path
. In your listing above, the last item for the inside venv case should be the same as the normal case: /app/python/lib/python2.7/site-packages
. You might try experimenting creating two simple virtualenv
, with and without --system-site-packages
, to see if that is the case. If not, you might try simplifying your configuration and trying again, like removing environment variables like PYTHONPATH
which you should not need to set.