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

"No matching distribution found" is confusing when unsupported bzip2 package is actually available #4646

Open
wsanchez opened this issue Aug 5, 2017 · 4 comments
Labels
C: error messages Improving error messages state: awaiting PR Feature discussed, PR is needed type: bug A confirmed bug or unintended behavior UX User experience related

Comments

@wsanchez
Copy link

wsanchez commented Aug 5, 2017

  • Pip version: 9.0.1
  • Python version: 3.6.2
  • Operating system: Ubuntu

I ran pip install Twisted and got this error message:

  Could not find a version that satisfies the requirement Twisted (from versions: )
Cleaning up...
No matching distribution found for Twisted

@dstufft figured out that my problem is that I built I python without bzip support. The error message above should say "I found Twisted, but you and your lame-ass Python can't have it because no bzip" (feel free to rephrase that) instead of telling me that there's no Twisted to be had, which is kinda confusing.

@pradyunsg
Copy link
Member

On the other hand, would it make sense to print a warning when pip detects that there's a Python installation without bzip2? It is a fairly important stdlib component for pip, it's absence means pip lacks a fair amount of functionality so it would make sense that it gets at least a warning.

@pradyunsg pradyunsg added the type: enhancement Improvements to functionality label Aug 6, 2017
@xavfernandez
Copy link
Member

@wsanchez
Copy link
Author

Sure, but there's an error being printed, and the error could do a better job of explaining what the problem-to-fix is. The current error looks like PyPI is missing the module being requested.

@pradyunsg pradyunsg added type: bug A confirmed bug or unintended behavior and removed type: enhancement Improvements to functionality labels Oct 7, 2017
@pradyunsg pradyunsg added this to the Print Better Error Messages milestone Oct 7, 2017
@chrahunt
Copy link
Member

chrahunt commented Oct 6, 2019

I think that adding a specific error message for bzip2, or any other specific reason for exclusion, would get complicated quickly. This is especially true if there are multiple packages excluded for different reasons. Maybe we could get a lot of benefit from an output like:

Some packages may have been found and excluded. To see details, re-run pip with --verbose.

If we actually want to commit to showing this only when at least one package has been found and excluded for some reason, then it could be

Some packages were found but excluded. To see details, re-run pip with --verbose.

@chrahunt chrahunt changed the title No bzip support means no Twisted and confusing error "No matching distribution found" is confusing when unsupported bzip2 package is actually available Oct 6, 2019
@pradyunsg pradyunsg added the state: awaiting PR Feature discussed, PR is needed label Feb 5, 2020
@nlhkabu nlhkabu added C: error messages Improving error messages UX User experience related labels Jul 28, 2020
@nlhkabu nlhkabu removed this from the Print Better Error Messages milestone Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: error messages Improving error messages state: awaiting PR Feature discussed, PR is needed type: bug A confirmed bug or unintended behavior UX User experience related
Projects
None yet
Development

No branches or pull requests

5 participants