poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Use py.exe to find python on Windows

Open bruchar1 opened this issue 1 year ago • 4 comments

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.

bruchar1 avatar Jan 25 '23 15:01 bruchar1

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

neersighted avatar Jan 25 '23 18:01 neersighted

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 avatar Jan 25 '23 19:01 bruchar1

Also related to #4217.

bruchar1 avatar Jan 25 '23 19:01 bruchar1

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.

TBBle avatar Aug 10 '23 06:08 TBBle