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
Copy file name to clipboardExpand all lines: docs/usage.rst
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,18 +128,25 @@ Changing the sessions default backend
128
128
129
129
By default Nox uses ``virtualenv`` as the virtual environment backend for the sessions, but it also supports ``uv``, ``conda``, ``mamba``, and ``venv`` as well as no backend (passthrough to whatever python environment Nox is running on). You can change the default behaviour by using ``-db <backend>`` or ``--default-venv-backend <backend>``. Supported names are ``('none', 'uv', 'virtualenv', 'conda', 'mamba', 'venv')``.
130
130
131
-
.. code-block:: console
132
131
133
-
nox -db conda
134
-
nox --default-venv-backend conda
132
+
.. tabs::
133
+
134
+
.. code-tab:: console CLI options
135
+
136
+
nox -db conda
137
+
nox --default-venv-backend conda
138
+
139
+
.. code-tab:: console Environment variables
140
+
141
+
NOX_DEFAULT_VENV_BACKEND=conda
135
142
136
143
.. note::
137
144
138
145
The ``uv``, ``conda``, and ``mamba`` backends require their respective
139
146
programs be pre-installed. ``uv`` is distributed as a Python package
140
147
and can be installed with the ``nox[uv]`` extra.
141
148
142
-
You can also set this option in the Noxfile with ``nox.options.default_venv_backend``. In case both are provided, the commandline argument takes precedence.
149
+
You can also set this option with the ``NOX_DEFAULT_VENV_BACKEND`` environment variable, or in the Noxfile with ``nox.options.default_venv_backend``. In case more than one is provided, the command line argument overrides the environment variable, which in turn overrides the Noxfile configuration.
143
150
144
151
Note that using this option does not change the backend for sessions where ``venv_backend`` is explicitly set.
0 commit comments