question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Report language, abi, platform tags when "DistributionNotFound: No matching distribution" occurs

See original GitHub issue
  • Pip version: 9.0.1
  • Python version: 2.7.7
  • Operating System: Linux / CentOS 5

Description:

Recently, Tensorflow upgraded their wheels to require an ABI tag of “cp27mu” from the previous required ABI tag of “none”. I didn’t realize this and was puzzled when I could not install the wheel as I had previously done. I was getting a “DistributionNotFound: No matching distribution found for tensorflow” message. Even after looking at the wheel names on pypi, it looked like there was a wheel that matched my Python install.

The problem turned out to be that my Python binary has an associated ABI tag of “cp27m” which is not compatible with “cp27mu”. I only realized this after putting some prints in the pip source.

It would be helpful for this information to be exposed by reporting the sets of (language, abi, platform) tags when their mismatch is the cause of a “no matching distribution” error message. I would say this should be printed by default, but I could see the argument for printing it only when the -v verbose command line option is specified. These details should not be shown when errors are due to a lack of distribution for a specified distribution name or when errors are due to a version mismatch.

From poking around, it looks like the tags for the current install are available from pep425tags.supported_tags, although it looks like there may be ways to specify other supported tags. These are checked in wheel.py/Wheel.supported(), although there may be other checks.

Perhaps the output could look like:

DistributionNotFound: No language, abi, and platform tag match found for tensorflow distribution.
Local pip install supports the following tags:
* language: 'cp27', 'py2', 'py22', 'py23', 'py24', 'py25', 'py26', 'py27'
* abi: 'cp27m', 'none'
* platform: 'any', 'linux_x86_64', 'manylinux1_x86_64'

What I’ve run:

$ pip install tensorflow

Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (14 by maintainers)

github_iconTop GitHub Comments

3reactions
pradyunsgcommented, Jun 6, 2019

The problem is not hypothetical – I’ve demonstrated the same on the PR. Furthermore, alternatives have been discussed and mentioned. And a concern being raised without suggesting how to resolve that concern is fairly normal.

Anyway, I don’t have the mental energy to explain why concensus building and addressing concerns raised by others is an important part of OSS (and many social systems) so I’ll skip that.

Regardless, thanks for your contribution!

3reactions
pradyunsgcommented, Jun 6, 2019

Hahah. I found the pip debug comment. Any guesses what one of the motivating examples for it was? 😉

https://github.com/pypa/pip/issues/5813#issuecomment-441251264

FTR - I think we should move to a new issue to discuss pip debug, if that’s the way we want to expose this at the CLI level.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "No matching distribution found for {package name ...
I have not use test.pypi.org, but it looks when you install a package from there it only looks for dependencies on test.pypi.org, ...
Read more >
apk generation - Google Groups
I am getting this error on deploy . ROR: No matching distribution found for python==3.9.5. Exception information:.
Read more >
Bug listing with status RESOLVED with resolution CANTFIX as ...
Config log reports segmentation fault" status:RESOLVED resolution:CANTFIX ... Digests do not match" status:RESOLVED resolution:CANTFIX severity:normal ...
Read more >
git delete tag name Code Example - Code Grepper
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). ... 'react-scripts' is not recognized as an internal or...
Read more >
mozilla-central: changeset 597869 ...
third_party/python/pip/pip/_internal/distributions/__init__.py ... + raise CommandError( + "Can not use any platform or abi specific options ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found