pipenv icon indicating copy to clipboard operation
pipenv copied to clipboard

Add detailed logging in case one of the libraries cannot be installed under the current operating system

Open SergeyCh92 opened this issue 2 years ago • 7 comments

Description of the problem situation: Suppose there is a service for which libraries are installed via -e. If for one of these libraries in requirements.txt there is a library that cannot be installed in the current operating system when trying to generate Pipfile.lock, the error log will be uninformative (I added an example of such a log in the screenshot below). I think it would be useful to add information to the error log about which library cannot be installed and what it depends on. image

SergeyCh92 avatar Aug 30 '23 07:08 SergeyCh92

If you run with -v you should see the output of the pip resolver which should provide more details.

matteius avatar Aug 30 '23 09:08 matteius

@matteius The result that you see in the screenshot is obtained after running the command using the --verbose argument (the same as -v) example of my command: pipenv lock --categories my-packages --verbose

SergeyCh92 avatar Aug 30 '23 09:08 SergeyCh92

@SergeyCh92 What version are you on then?

matteius avatar Aug 30 '23 09:08 matteius

@matteius 2023.7.11

SergeyCh92 avatar Aug 30 '23 09:08 SergeyCh92

@SergeyCh92 there was a patch of the logger restricting its output in that version -- please try with 2023.8.28 which should have much more detailed logging from pip.

matteius avatar Aug 30 '23 09:08 matteius

@matteius when using version 2023.8.28 and the --verbose argument, the log really became more detailed. For example, there was an indication of a library whose processing failed during the generation of Pipfile.lock. but there is still no message that the cause of the error is an incompatibility of one of the libraries specified in requrements.txt with the operating system. I mean requirements.txt which contain dependencies for the library we are trying to add to Pipfile.lock It seems to me it would be cool if you could add logging of this information in future releases :)

SergeyCh92 avatar Aug 30 '23 10:08 SergeyCh92

Even pip doesn't provide that level of detail, and we are leveraging pip, so I am not sure it will be feasible for us. Can you give an example of such a failure and what you would expect to see? Most likely pip is invoking setuptools and the OS is missing a dependency, because it doesn't sound like a lock resolution issue per-se.

matteius avatar Sep 01 '23 10:09 matteius