virtualenv --system-site-packages not using system site packages

前端 未结 1 991
悲哀的现实
悲哀的现实 2021-01-12 00:27

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

相关标签:
1条回答
  • 2021-01-12 01:15

    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.

    0 讨论(0)
提交回复
热议问题