Skip to content

How does hatch locate python versions? Can it work with pyenv? #642

Answered by jstvz
gerbendekkervolue asked this question in Q&A
Discussion options

You must be logged in to vote

Ideally, hatch would be able to work with pyenv by setting a config setting, providing an env variable, or any other way - but I cannot figure out how...

Any input on how to achieve this?

I can't find any references to dirs.python in the codebase outside of DirConfig (maybe it's for a planned feature? 🤷🏾‍♂️).

Hatch's default environment, virtual uses virtualenv to discover python versions, which can't see pyenv's versions:

hatch env show
                  Standalone
┏━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Name    ┃ Type    ┃ Dependencies ┃ Scripts ┃
┡━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ default │ virtual │ pytest       │ cov     │
│         │         │ pytest-cov  …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@gerbendekkervolue
Comment options

Answer selected by gerbendekkervolue
Comment options

ofek
Oct 28, 2023
Maintainer Sponsor

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants