-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conda environments don't follow the protocols that virtualenv/venv do (setting sys.prefix to the virtualenv and sys.base_prefix to the prefix of the underlying system installation). #9788
Comments
Conda isn't designed in this way. Conda environments are deliberately isolated from each other. Conda is a package manager for multiple languages so this pythonism doesn't fit well with it. This is unlikely to change because of the following considerations. Attempting to ape python venvs in conda would make conda much worse and would only be achievable with some egregious hacks. My opinion of virtual environments, from an ecosystem design perspective (which informs my work on conda) , at a high level, is that it should not be possible to escape the encapsulation of each environment and this prefix distinction does just that. I cannot think of a good reason to allow such leakage and would love to hear of some (honestly I would!) You should be able to use the python stdlib's venv module though just fine with conda to get the behavior you are after. You can create venvs in any conda environment you wish and those will follow the virtualenv modus operandi. It's not correct to think of conda environments as equivalent to venvs. You cannot install an R interpreter (in any useful way) into a python venv, for example. |
Extensive related discussion at #7173 |
xref: #5861 |
I'm pretty sure that this can be closed. |
What's the solution now? |
Solution to which problem? This issue seems to be asking that conda environments behave like Python virtualenvs -- which is not a correct model for the abstraction. Conda is a "separate software distribution ecosystem" from the perspective of https://packaging.python.org/overview/, and it shouldn't behave like Python virtualenvs (https://packaging.python.org/overview/#virtualenv). |
Hi there, thank you for your contribution! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment. Thanks! |
Hi,
See the discussion here. Could you guys please let conda follow the protocols that virtualenv/venv do?
Regards
The text was updated successfully, but these errors were encountered: