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
{{ message }}
Repository navigation
No hatch environment is discovered on Windows #23121
Follow the steps in the TPI. After running hatch run python -V and waiting for it to finish. Run Select interpreter command, it takes some time to refresh environments. But the hatch environment is not seen,
This might be a bug is hatch itself, from VS Code with same CWD hatch returns: C:\Users\kanadig\AppData\Local\hatch\env\virtual\something\Lwno8mvj\something
The issue seems to be that VS Code (node APIs) use lowercase for Drive letters, the CWD set while running this might have lowercase drive letter and that might be changing the hash.
Yep I discovered the same issue while debugging, this was previously encountered with poetry as well: python-poetry/poetry#3829. Opened an issue on Hatch while incorporating the same workaround as Poetry.
Activity
karthiknadig commentedon Mar 25, 2024
From logs:
From command line:
karthiknadig commentedon Mar 26, 2024
This might be a bug is hatch itself, from VS Code with same CWD hatch returns:
C:\Users\kanadig\AppData\Local\hatch\env\virtual\something\Lwno8mvj\somethingThe issue seems to be that VS Code (node APIs) use lowercase for Drive letters, the CWD set while running this might have lowercase drive letter and that might be changing the hash.
karrtikr commentedon Mar 26, 2024
Yep I discovered the same issue while debugging, this was previously encountered with poetry as well: python-poetry/poetry#3829. Opened an issue on Hatch while incorporating the same workaround as Poetry.
[-]No hatch environment seen in select environment QuickPick [/-][+]No hatch environment is discovered on Windows[/+]karthiknadig commentedon Mar 26, 2024
Upstream issue pypa/hatch#1350
Add workaround for hatch environment discovery on Windows (#23129)
karthiknadig commentedon Mar 27, 2024
This is working now.
Add workaround for hatch environment discovery on Windows (microsoft/…
Add workaround for hatch environment discovery on Windows (microsoft/…