Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use py.exe to find python on Windows #7409

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bruchar1
Copy link
Contributor

On Windows, python installs the py.exe launcher as a reliable way to find a given installed version of python.

This PR adds the possibillity to specify a python version (e.g. poetry env use 3.10) on Windows.

@neersighted
Copy link
Member

We tried this once, I do not recall if it was merged and reverted or simply never merged. The takeaway was that pythonfinder or something similar (pure Python) should be used instead of py.exe which really designed for our use case.

cc @finswimmer @abn

@bruchar1
Copy link
Contributor Author

Fixes #3520. Related to #5778.

I'm really not sure what is bad about calling py.exe, since poetry env use already calls python using a subprocess. I only changed the name of the called executable.

I'm not against the use of pythonfinder, but imho, this solution is just simpler.

@bruchar1
Copy link
Contributor Author

Also related to #4217.

@TBBle
Copy link
Contributor

TBBle commented Aug 10, 2023

The prior PR for this approach that I could find is #4217. The comments seem to cover the main concerns with this approach, and was closed in favour of a pythonfinder-based approach, which appeared in #5778 but apparently never went anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants