-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Natively support py
launcher on Windows
#3520
Comments
I wonder if it might be better to use a lib that implements PEP-514 (e.g. pythonfinder) to find executables instead of using an application like Related-to: #2117 |
Yeah, that would make sense too, since |
Any workaround for now? |
@eyadmba the workaround is to specify the full path to the
Or, if you have multiple environments already, one trick I sometimes do is to type |
I'm closing this ticket in favour of #2117, since with Python 3.11's It might be nice to have a way to make |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
poetry env use 3.9
is really nice, but assumes a binary namedpython3.9
is in the path.On Windows, the Python installer does not install such version-named binaries, and so to avoid having multiple
python.exe
on the path, thepy
launcher is included, which is used bypy -<version>
exactly as Poetry is trying to do.It would be nice if Poetry could correctly use this. I couldn't find a way to do this easily, as
tries to execute a binary named "py -3.9" (I suspect this is an intended regression due to fixing #1747), and without the quotes, it tries to take
-3.9
as an option for itself, and fails.As a workaround, I am, under PowerShell, doing this:
which works fine.
Note that this isn't a problem for simply
poetry install
workflows, as it deafults to the Python with which Poetry is associated, and Poetry already knows the location of this binary. However, I hit this with a package that does not support Python 3.9, while I have Poetry installed under Python 3.9.This problem also appears when trying to clean up venvs, as
poetry env remove
does not support "default Python" the waypoetry install
does.poetry destroy
was rejected in #926, so you can only clean up Poetry env by naming either the env's full name or the path to the Python binary; the latter requires the same workaround I'm using above.The text was updated successfully, but these errors were encountered: