-
How do I define which version of Python Hatch should always default to when creating a random environment? If I want to run a one-off Python script, where I don't have a full Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Setting the |
Beta Was this translation helpful? Give feedback.
-
if you create env before, use tldr hatch python install 3.10
hatch python find 3.10
# use the path show in last command
export HATCH_PYTHON=~/.local/share/hatch/pythons/3.10/python/bin/python3
hatch env prune # if you create env before, use this to clear old env
hatch shell
python --version |
Beta Was this translation helpful? Give feedback.
Setting the
HATCH_PYTHON
environment variable to the path to the desired Python executable is the solution to this.