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

Suggest using the py launcher when installing Poetry globally on Windows #5611

Closed
1 task done
johnthagen opened this issue May 14, 2022 · 5 comments · Fixed by #5618
Closed
1 task done

Suggest using the py launcher when installing Poetry globally on Windows #5611

johnthagen opened this issue May 14, 2022 · 5 comments · Fixed by #5618
Labels
area/docs Documentation issues/improvements

Comments

@johnthagen
Copy link
Contributor

  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

I am starting to use Poetry and would like to try to improve some rough edges I have hit before recommending it to novice users.

On Windows, the official installation instructions state:

(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -

And similar for the master branch:

(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -

The problem is that the most common way to install/invoke Python on Windows for launching is through the py launcher. Adding python to the PATH is a box that is unchecked by default. This means from an average user on Windows their first experience with trying to install Poetry the recommended way will be failure.

I recommend that the default instructions | py - or at the very least mention that you might have to do this prominently.

@johnthagen johnthagen added area/docs Documentation issues/improvements status/triage This issue needs to be triaged labels May 14, 2022
@abn
Copy link
Member

abn commented May 15, 2022

Thanks for highlighting this. I'm not too familiar with the windows ecosystem to comment on how relevant this is.

Might be worth a doc update. A generic note that the python executable could be different with this as an example might be good. Happy to review PRs.

Source: https://github.com/python-poetry/poetry/blob/master/docs/_index.md

@abn abn removed the status/triage This issue needs to be triaged label May 15, 2022
@johnthagen
Copy link
Contributor Author

I'm going to gather some data to make sure I can support this change.

I did a default installation of Python 3.10.4 from the official python.org download page on Windows 10.

Screen Shot 2022-05-16 at 7 56 04 AM

  • Note that by default the launcher (py) is installed.
  • And by default python is not added to the PATH.
PS C:\Users\IEUser> python
python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ python
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (python:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\IEUser> py
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

In a customized installation:

Screen Shot 2022-05-16 at 7 57 56 AM

"Add Python to the environment variables" is unchecked, so python remains not added to the PATH by default.

The Microsoft Store package, on the other hand, sadly does not install the py launcher, but does install python and python3 into the PATH.

@johnthagen
Copy link
Contributor Author

@johnthagen
Copy link
Contributor Author

According to Steve Dower, 95% of Windows users download from python.org, so let's target py as the primary installation method.

Copy link

github-actions bot commented Mar 2, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants