-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
site.py does not include recent code to support venv #1421
Comments
Yeah, #1377 will fix this. |
(2) there is quite surprising and took me a bit to track down the root cause (and find this issue). Maybe renaming this issue to "Virtualenvs created with virtualenv.py have |
@Julian nothing better than watch the feature branch on this repository yet; will try to make some progress then this, but my free time I can spend on this is sadly limited. |
Of course understandable!
…On Wed, Dec 11, 2019, 12:02 Bernát Gábor ***@***.***> wrote:
@Julian <https://github.com/Julian> nothing better than watch the feature
branch on this repository yet; will try to make some progress then this,
but my free time I can spend on this is sadly limited.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1421?email_source=notifications&email_token=AACQQXQZS63WTIYAOUXXP23QYDJG3A5CNFSM4I5N37LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGS32EA#issuecomment-564509968>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQQXVIAKYPZAPS5EYRPVTQYDJG3ANCNFSM4I5N37LA>
.
|
This will be fixed by the rewrite, where the progress can be tracked by https://github.com/pypa/virtualenv/milestone/7 |
See https://bugs.python.org/issue38369 for details, but basically the site.py file shipped with virtualenv does not include code to support Python 3 venv environments. In practical terms, this means that if you create a venv using
python -m venv xxx
from within a virtualenv, then (1) pip is not properly installed into the venv, and (2) the venv can see the parent virtualenv's site-packages.I doubt this is fixable in any practical sense with "traditional" virtualenv - the need to retain 2.7 compatibility, along with the complexity of trying to backport the venv support code manually, means that this is probably not worthwhile for an edge case like this. Creating virtual environments from within one another is dangerous at best and unsupported in general, so "don't do that" is probably the only reasonable answer. It is annoying that the problem manifests itself with a silently broken environment, rather than a clean error message, but I don't think there's much that can be done about that (core Python is unlikely to add special support for a 3rd party library, and I'm not sure an error could be added from the virtualenv side).
Hopefully #1377 will be able to handle this more cleanly - if nothing else, it is an edge case that should be considered in that work.
The text was updated successfully, but these errors were encountered: