-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Plainly indicate/implicate the package being installed for installation errors. #6959
Comments
I think this comment is on-topic, apologies if it's not quite: I'm a maintainer of pipx, and am looking into parsing the pip output for errors to distill and give back to our user in a more friendly format. What I'm really trying to extract is just a simple list of every dependency that failed to build. Unfortunately I'm not sure there is any single error message I can look for. There seems to be a plethora of different kinds of failures and their associated error messages from trying to install various packages. If What I'd really like is some message from pip that I can depend on being present for every package that fails to install. All of the detail is great, but at the end it would be nice for pip to come back in with something like:
I understand that error attribution back to the package and not to pip helps prevent users from assuming an installation failure is a pip bug. But identifying clearly every failed package would also be invaluable for pip users. And for applications parsing pip output, it would be nice to have clear, reliable messages to look for. |
I would recommend always installing |
Good to know. I have seen cases where |
This is done now, as part of #10795. |
What's the problem this feature will solve?
If a user installs a package and there is an error, the actual cause may be the package itself. Currently it is not clear from the output that pip is delegating some parts of the installation process to the package (or a build backend). This is based on several issues raised in the pip issue tracker:
To take one concrete example (#6667):
In this case, the first place a user should consider looking is the pandas issue tracker. In order to get that from the output, they would need to understand how Python packaging works which isn't (and shouldn't) be a requirement for consuming Python packages.
Describe the solution you'd like
When we delegate some part of the installation to a package (via setup.py) or to a build backend, we should print a message that leads the user to consider the package being installed as the more likely cause than pip. For example:
Some prior art:
npm ERR! package.json This is most likely not a problem with npm itself.
An error occurred while installing package "name"
One obvious issue with this approach is that package maintainers would get users creating issues for pip bugs. Personally I think this concern is outweighed by the following:
Another issue would be misdirecting (possibly new) package developers. If the error occurs while installing a requirement given as a local path, we could instead direct users to
setuptools
or the relevant build-backend, which could help situations like #6350. IMO this can be addressed as a separate issue to keep this one simple.Alternative Solutions
Additional context
The text was updated successfully, but these errors were encountered: