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

Hint to users that versions are filtered based on current python version #11446

Closed
1 task done
hughsaunders opened this issue Sep 14, 2022 · 2 comments
Closed
1 task done
Labels
resolution: duplicate Duplicate of an existing issue/PR type: feature request Request for a new feature

Comments

@hughsaunders
Copy link

hughsaunders commented Sep 14, 2022

What's the problem this feature will solve?

When trying to install a package a user may be faced with a message no matching distribution found when the package and version do exist. For example:

No matching distribution found for ansible==6.0
If you go to pypi you can see that ansible 6.0 does exist: https://pypi.org/project/ansible/6.0.0/

The install failed in this case because ansible 6.0 requires python 3.8 and this was being executed on python 3.6.

The feature I would like is to hint to the user that the version was not found because available pypi package versions are filtered based on the currently running version of python.

Describe the solution you'd like

Query whether the package exists for other versions of python and indicate that to the user.

For example: ansible==6.0 requires python >= 3.8 and cannot be installed with the current python version (3.6.0)

There would need to be multiple messages depending on whether any packages matching the constraint exist or not.

Alternative Solutions

A simpler solution would just be to hint to the user that the versions returned by pip are linked to the current python version.

For example: No matching distribution found for ansible==6.0 that is compatible with ${CURRENT_PYTHON_VERSION}

Additional context

I hope this is a simple to implement request that will improve troubleshooting for end users.

Code of Conduct

@hughsaunders hughsaunders added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Sep 14, 2022
@uranusjr
Copy link
Member

uranusjr commented Sep 14, 2022

Is this information available with -v? There can be a lot of versions being excluded and it's likely not a good idea to just show all of them. I also recall there's already an issue for this, not sure if it's implemented or not. Would be nice if someone bothers to check.

@pradyunsg
Copy link
Member

Consolidating this into #6526, which is basically this issue but filed in the past with a slightly larger scope.

@pradyunsg pradyunsg added resolution: duplicate Duplicate of an existing issue/PR and removed S: needs triage Issues/PRs that need to be triaged labels Sep 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate Duplicate of an existing issue/PR type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants