pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

Support extensive Python environment discovery

Open connernilsen opened this issue 8 months ago • 4 comments

We'd like to match a lot of the behavior vscode-python supports around finding different interpreters and environments, and to do that, there are a bunch of environment managers we should target. Ideally, we'll be looking at the following:

  • [x] Venv
  • [ ] Conda
  • [ ] Poetry
  • [ ] Hatch
  • [ ] Pyenv
  • [ ] Pixi
  • [ ] ActiveState

We already have partial support for a lot of these when the environment is directly sourced for CLI usage, and in the IDE we are using vscode-python, but going through to make sure we're doing the right things in all of the above cases would be great to check.

connernilsen avatar May 08 '25 03:05 connernilsen

Python Interpreter can also sometimes be found at .venv/Scripts instead of .venv/bin/python3

BenMawnMahlauNBTC avatar May 16 '25 13:05 BenMawnMahlauNBTC

Hey @BenMawnMahlauNBTC, thanks for reporting, I'll take a look at adding a search for the interpreter there soon!

connernilsen avatar May 16 '25 20:05 connernilsen

@BenMawnMahlauNBTC actually I just realized the way it's implemented now will work for finding at .venv/Scripts! Let me know if you start running into problems with that and we can open a new issue.

connernilsen avatar May 16 '25 22:05 connernilsen

+1 for poetry

yangdanny97 avatar May 17 '25 20:05 yangdanny97

This issue has someone assigned, but has not had recent activity for more than 2 weeks.

If you are still working on this issue, please add a comment so everyone knows. Otherwise, please unassign yourself and allow someone else to take over.

Thank you for your contributions!

github-actions[bot] avatar Jul 12 '25 00:07 github-actions[bot]

This issue has someone assigned, but has not had recent activity for more than 2 weeks.

If you are still working on this issue, please add a comment so everyone knows. Otherwise, please unassign yourself and allow someone else to take over.

Thank you for your contributions!

github-actions[bot] avatar Jul 28 '25 00:07 github-actions[bot]

I'm gonna close this, since I think most environments are extensions on top of venv or conda. If there are others we need to look at explicitly handling, we can address in new issues as they come up

connernilsen avatar Aug 07 '25 19:08 connernilsen