You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a conda environment active and try to run a session with using uv as a backend and session.install, uv throws an error because it detects both an active conda environment and an active virtual environment:
nox > Command uv pip install ruff failed with exit code 2:
error: Both VIRTUAL_ENV and CONDA_PREFIX are set. Please unset one of them.
Expected Behavior
nox should clear both VIRTUAL_ENV and CONDA_PREFIX environment variables before trying to run a session.
(I am mixing conda environments and virtual environments for a project because my project needs graphviz, which is nice to install with conda. My dev environment is using conda. However, I don't need it for all environments like linting, so it would be nice to be able to use uv for fast sessions.)
This fixes the specific problem I was having. However, I think the opposite case would still be an issue (active venv, nox session uses conda env and user tries to use uv) and would install things into the wrong environment.
Current Behavior
If you have a conda environment active and try to run a session with using uv as a backend and
session.install
, uv throws an error because it detects both an active conda environment and an active virtual environment:Expected Behavior
nox should clear both
VIRTUAL_ENV
andCONDA_PREFIX
environment variables before trying to run a session.(I am mixing conda environments and virtual environments for a project because my project needs graphviz, which is nice to install with conda. My dev environment is using conda. However, I don't need it for all environments like linting, so it would be nice to be able to use uv for fast sessions.)
Steps To Reproduce
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: