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
Here are a few ways to set up an environment with Hatch using the pyproject.toml file:
Virtual environment (.venv)
[tool.hatch.envs.default]
type = "virtual"path = ".venv"
This creates a virtual environment in the .venv folder within the project directory.
Virtual environment (Hatch default)
[tool.hatch.envs.default]
type = "virtual"
This creates a virtual environment in the default location specified in Hatch's config.toml file under the [dirs] section, as described here.
Conda environment
[tool.hatch.env]
requires = ["hatch-conda"]
[tool.hatch.envs.default]
type = "conda"
This sets up a Conda environment.
Question
Is there a way for the user to configure Hatch to use their default environment setup (e.g., via the config.toml file) instead of what's defined in the pyproject.toml file? Can the user override the environment settings in pyproject.toml with their own default preferences?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone,
Here are a few ways to set up an environment with Hatch using the
pyproject.toml
file:This creates a virtual environment in the
.venv
folder within the project directory.This creates a virtual environment in the default location specified in Hatch's
config.toml
file under the[dirs]
section, as described here.This sets up a Conda environment.
Question
Is there a way for the user to configure Hatch to use their default environment setup (e.g., via the
config.toml
file) instead of what's defined in thepyproject.toml
file? Can the user override the environment settings inpyproject.toml
with their own default preferences?Beta Was this translation helpful? Give feedback.
All reactions