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 useful warning if Python version is too low for desired package #8831

Closed
Wrzlprmft opened this issue Sep 1, 2020 · 6 comments
Closed
Labels
C: error messages Improving error messages UX User experience related

Comments

@Wrzlprmft
Copy link

Environment

(I am reporting this problem, because a user of my software encountered it. Therefore I do not have all the specifics.)

  • pip version: 20 or lower
  • Python version: 3.6.9
  • OS: Linux Mint 19.2 Tina

Description

When trying to install a package, which offers no version compatible with the current Python version, the following error message is raised:

ERROR: Could not find a version that satisfies the requirement [package-name] (from versions: none)
ERROR: No matching distribution found for [package-name]

While technically correct, this does not inform the user what the actual problem is (their version of Python is too low).

Expected behavior

Tell the user that the package could be installed for a higher version of Python.

How to Reproduce

Try to install any package that requires a Python version higher than the one on the system, e.g., install a package requiring Python 3.8 on a system with Python 3.6.

@uranusjr
Copy link
Member

uranusjr commented Sep 1, 2020

I believe this is already tracked somewhere, but couldn’t find the issue at the moment, and will keep this open for the moment. Can you describe what message would you expect to see in this situation?

@Wrzlprmft
Copy link
Author

Can you describe what message would you expect to see in this situation?

Something like:

ERROR: Could not find a version that satisfies the requirement … for your version of Python. The requirement … can be fulfilled for Python 4.2 or higher. Consider upgrading Python.

@McSinyx
Copy link
Contributor

McSinyx commented Sep 1, 2020

Until we find out which issue also reported this, I just want to drop by and say this applies to all platform incompatibilities, including Python version too high (e.g. tensorflow six==1.10.0 on Python 3.8), ABI and architecture (in case the project only provides binary).

@nlhkabu nlhkabu added UX User experience related C: error messages Improving error messages labels Sep 1, 2020
@xavfernandez
Copy link
Member

Likely #7797 (or its cousin #6526)

@pradyunsg
Copy link
Member

I think #6526 is the broader issue that this one is tied to (like how all our dependency resolution ones are tied to 988).

@uranusjr
Copy link
Member

I’m going to just close this in favour of #10421. This specific error message comes from the legacy resolver and is not going to be improved upon. The newer issue provides more relevant context toward the issue in its current state, against the current resolver implementation.

@uranusjr uranusjr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: error messages Improving error messages UX User experience related
Projects
None yet
Development

No branches or pull requests

6 participants