-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Parseable error message for missing OS/non-pip dependencies? #6104
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
Comments
... Just now, even further down the process, I was just faced with this: I am on the verge for feeling physical pain, as I've to remove the setup so far that literally continued for at least an hour and half and restart again, and I don't know if there's going to be other errors like this. |
No problem - it's definitely something painful (and particularly if you're not using pip directly, but it's being used behind the scenes by a tool you're using). I'd argue at least in part that the tool that calls pip should be catching the errors, and presenting them to you in a more helpful way, and not just dumping pip's error output on you (after all, pip is a tool for Python developers, so its output assumes a set of skills and knowledge that you don't have). Having said that, though, the errors you are seeing are not technically from pip. They are produced by a subprocess that pip runs to "build a wheel" (a "wheel" is the binary artifact that pip actually installs). Of course, the arguments above apply just as well to pip - we shouldn't just dump the build tool's output on our users, we should present it more helpfully - but there's a lot of variation in the build steps and their output, and in our defence, we expect our users to know something about how Python packages are built, so it's not as bad for them as it is for you. None of which helps you much, though, I'm afraid. The best I can suggest is that you need to get in touch with the projects whose installs are failing - that's visible in the output as
and ask them to either help diagnose the output, or as a feature request to them, ask them to improve their build scripts to give better error output. We have considered improving the output in the past, but we've never really found any good solution that doesn't risk hiding vital diagnostic information in at least some cases. |
Getting the projects to output better error messages will only help the second point I raised:
But that does not help me in my ultimate goal of just getting to know what kind of libraries and files the Ideally, If there's no such existing method, please add feature request label to this issue. |
Pip doesn't handle non-Python dependencies, sorry. If you want functionality like that, maybe conda is a better fit for your requirements |
I'll go check out what |
I just remembered, you're not calling pip directly but a tool you're using does that for you. So I guess conda won't help you much (it's an alternative to pip).
Well, that was the point I made about asking those packages. Also, if the packages provide a list of their dependencies in machine readable form, maybe the tool you're using could check that the dependencies exist before calling pip. I don't really know, but either way it's not really something for pip but rather for other tools. |
Hi @oxwivi! I hope things have been easier for you since this issue was created. One action I think we can take away from this is the need to make it clear (above and below the output) which package failed to install, and that you should be following up with that package author. We're tracking just that in #6959. As mentioned above, outputting non-Python dependencies is something that should be brought up to package authors. I know several packages that do checks in their I hope that helps or gives some feeling that this will at least get easier to manage in the future. Since we're already tracking the followup activity in the other issue I will close this one. Thanks! |
pip 18.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
Python 2.7.15+
Linux rpi3 4.19.0-1-arm64 #1 SMP Debian 4.19.12-1 (2018-12-22) aarch64 GNU/Linux
For context, I'm not a Python developer, I'm a user of a certain Python app that uses
pip
to manage its Python dependencies. And I am installing the aforementioned piece of Python software on adeboostrap
'd system, which brings me to my pain point: my environment is, as anydebootrap
user can tell you, very, very bare bones.And as you might expect, every so often my
pip
package installation fails, because either itself or one of its many dependencies cannot find libraries and dependencies they expect on the system.The situation is exacerbated by very bad error messages:
stdout
fails with referring to thepip
installation failure that stopped it, with nary a mention of why:pip
packages were simultaneously mentioned, other times only one, causing me to run through the process after fixing a single dependency issue each time.pip install
for each packages, and finally I get some verbose error message that shows me what's missing, but it only displays only the first missing dependency the installation process found, leading me to resolve one, then run the command again for the next one and so on and so forth.In the end, I simply resorted to looking for installation documentation of each of the packages and installing distro-specific packages as noted by them. Even then, it didn't end my problems because I'm on
sid
and its repo did not carry the exact packages as specified in the docs, so I had to workaround by doingapt build-dep python-lxml python-pil $etc
(There's nopython-pillow
or similar in Debian repos, perhaps there's some story, IDK), and finally get around to getting my actual target to install and compile thepip
packages as it saw fit.This ended being a sort of venting post, please overlook it; I just want to know if there's anyway for
pip
to check and output OS dependencies of every packages that I may programmatically parse and look up for corresponding packages using my distro's package manager of choice?If there isn't please feel free to tag this post as feature request.
The text was updated successfully, but these errors were encountered: