Skip to content

No hatch environment is discovered on Windows #23121

Closed

Description

Testing #23088

Philipp A. (@flying-sheep)

Platform: Windows

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,

Activity

  1. karthiknadig commented on Mar 25, 2024

    @karthiknadig
    MemberAuthor

    From logs:

    2024-03-25 11:17:18.682 [info] > hatch env show --json
    2024-03-25 11:17:18.682 [info] cwd: .
    2024-03-25 11:17:19.195 [info] > hatch env find default
    2024-03-25 11:17:19.195 [info] cwd: .
    

    From command line:

    > hatch env find default
    C:\Users\kanadig\AppData\Local\hatch\env\virtual\something\XIyUl07c\something
    
  2. karthiknadig commented on Mar 26, 2024

    @karthiknadig
    MemberAuthor

    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.

  3. karrtikr commented on Mar 26, 2024

    @karrtikr

    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.

  4. added
    bugIssue identified by VS Code Team member as probable bug
    area-environmentsFeatures relating to handling interpreter environments
    needs PRReady to be worked on
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Mar 26, 2024
  5. changed the title [-]No hatch environment seen in select environment QuickPick [/-] [+]No hatch environment is discovered on Windows[/+] on Mar 26, 2024
  6. karthiknadig commented on Mar 26, 2024

    @karthiknadig
    MemberAuthor

    Upstream issue pypa/hatch#1350

  7. karthiknadig commented on Mar 27, 2024

    @karthiknadig
    MemberAuthor

    This is working now.

  8. locked as resolved and limited conversation to collaborators on Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions