-
Notifications
You must be signed in to change notification settings - Fork 933
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
Update creating-command-line-tools.rst to fix typo #1591
Conversation
The import statement, as written, fails. It doesn’t match the name of the file that is set up with the greet() function.
Thanks for catching this! It was left over from some refactoring work. I chose this file and function name in the end to match the package name, which I prefer to
Glad to have helped!
The basic idea was to promote |
Glad to help out!
Oh wow, a lot of this is new info to me – thanks for sharing that thinking and those details! TBH, I don’t feel familiar enough with the pros and cons of pip vs pipx to feel comfortable adding information around it to the guide. I’m only really familiar with macOS, but if pip is causing issues for folks on Linux, it seems sensible enough to recommend something else, as you have. |
I do not think this framing is fair. What is happening is that a lot of people are not comfortable with using pip+venv, in particular when the only thing they want is to install and use an application (as opposed to write code in Python). Then they try things that they see online and end up potentially messing up their system (typically with commands like pip and venv themselves are far from being nuisances, they play their role perfectly fine as expected, but I would argue that they are developer tools rather than end-user tools. It is when end-users (mis)use pip+venv that things can go (very) wrong. |
Sorry, perhaps the wording is a bit harsh. I only wanted to say that actually using these tools on systems that opted in to PEP 668 has some practical drawbacks now, which is why I (and most people) prefer using
Of course I agree that separating Python and OS environments is a good thing, although I haven't experienced any issues myself and found the concept of user installs reasonable. Still, the additional safeguard prevents users from damaging their systems, so is for the better.
Of course that is true. |
The import statement in
cli.py
, as written, fails. It doesn’t match the name of the file (greet.py
) that is set up with the greet() function.An alternative solution would be to edit the name of
greet.py
to behello.py
, which I could also imagine being a useful approach, to avoid potential ambiguity from repeated words in different places. I chose to submit the simpler fix, though.(By the way, thank you for this amazing guide! It’s so clear and helpful.)
One further thought/question: maybe it would be helpful to say that this can also be installed with pip? I wasn’t sure if I could just use pip and a venv, but didn’t want to add another layer of complexity to my setup, so I tried. And, sure enough, pip and a venv will install this, no problem! I get that you want to present a single, simple path, however, so I can understand just mentioning pipx if that seems like the best choice.