cosven <yinshaowen...@gmail.com> added the comment: It is actually a bug in virtualenv instead of venv.
> the outer environment's pip leaks into the inner environment; This is true, but why? In short, the inner-env python binary use `outer-env/` directory as its `prefix` direcotry, but the `inner-env/` directory is the right `prefix` directory. When the Python binary is executed, it attempts to determine its `prefix` (which it stores in sys.prefix), which is then used to find the standard library and other key files, and by the `site` module to determine the location of the site-package directories. However, virtualenv has its own `site` module, which is different implemented from the site module in stdlib. It makes the inner-python get a wrong `prefix` value. > (Could a fix on virtualenv's side help?) In my own opinion, if virtualenv change its implementation of site.py, there is a change to fix this. ---------- nosy: +cosven _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue30811> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com