Skip to content

Confusion due to conflict message that reports conflicts incorrectly #11796

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

Closed
1 task done
lucasjinreal opened this issue Feb 12, 2023 · 9 comments
Closed
1 task done
Labels
type: support User Support

Comments

@lucasjinreal
Copy link

Description

I don;t know when, start from some version of pip, it's extremly sucks.
For the latest one


The conflict is caused by:
    mediapipe-model-maker 0.1.0.2 depends on tensorflow>=2.10
    mediapipe-model-maker 0.1.0.1 depends on tensorflow>=2.10
    mediapipe-model-maker 0.1.0 depends on tensorflow>=2.10

Conflict??????

Tell me which part is conflict?????

BTW, why newest pip always download all old version automatically???
I just install pip install mediapipe_model_maker

Which means, I just need latest one, plkease stop write code donwload all versions!!!

Expected behavior

No response

pip version

latest

Python version

latest

OS

amcos

How to Reproduce

  1. pip install

Output

No response

Code of Conduct

@lucasjinreal lucasjinreal added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Feb 12, 2023
@DiddiLeija
Copy link
Member

I can't reproduce your issue, please provide more details (pip's exact version, environment maybe?).

Which means, I just need latest one, plkease stop write code donwload all versions!!!

There's a reason for pip checking a bunch of versions instead of just the latest one. You may find some useful info about this (which is called "dependency resolution") at https://pip.pypa.io/en/stable/topics/more-dependency-resolution/

Also, maybe this is a mediapipe-model-maker issue instead of pip?


And btw, I would suggest you to be nicer with your words. If there's a real bug I'm sure we'll find out a fix, and if you or the package (mediapipe-model-maker) maintainers had a mistake we'll let you know :)

@DiddiLeija DiddiLeija added the S: awaiting response Waiting for a response/more information label Feb 13, 2023
@lucasjinreal
Copy link
Author

lucasjinreal commented Feb 13, 2023

@DiddiLeija Hello, I don't think recursive download all version is a solution to resolve dependencies problem.

From users view, some libs might have lots of versions (even minor versions), it really anoying to watch them download all and waiting for the lib I need to install which need that lib as dep.

Especially consider users in China have a very poor internet connection with many pip host (some of them might have their own pip host but server not inside China)

It can be very easily broken to download them all.

I just post this issue as a user experiences aspect, it;s might be not a bug or something.

@lucasjinreal
Copy link
Author

I am not a expert of pip, I am not really undertstand algorithm behind pip, maybe they have their own thoughts, but as an user,
think me as an idiot,

first of all, as this issue states, it tells me there have a conflict, but I really don't understand why?

The conflict is caused by:
    mediapipe-model-maker 0.1.0.2 depends on tensorflow>=2.10
    mediapipe-model-maker 0.1.0.1 depends on tensorflow>=2.10
    mediapipe-model-maker 0.1.0 depends on tensorflow>=2.10

anywhere?

So if it could be, a much more detailed, reasonable failure message could make users much more clear.

And sometimes, some lib have a lib which constraint as libxxx >= 4.10
then pip would try download version like 4.9.1 4.9.2 4.9./3....
which also looks like crazy to me, I think it for all day don't understand why it shoiuld do that. Neverthless the user experiences...

@pradyunsg pradyunsg added type: support User Support and removed type: bug A confirmed bug or unintended behavior S: awaiting response Waiting for a response/more information S: needs triage Issues/PRs that need to be triaged labels Feb 13, 2023
@pradyunsg pradyunsg changed the title THIS IS REALLY REDICULESS Confusion due to conflict message that reports conflicts incorrectly Feb 13, 2023
@DiddiLeija
Copy link
Member

DiddiLeija commented Feb 13, 2023

I'd say your dependency issue (around mediapipe-model-maker) relies outside of pip, since its possible to install the package with other environments. Maybe reporting that with the package maintainers would help you?

So if it could be, a much more detailed, reasonable failure message could make users much more clear.

Sounds reasonable. We could work on a clearer message on dependency conflicts :)
Another possible thing would be explaining a bit more the current behavior in the docs.

@notatallshaw
Copy link
Member

notatallshaw commented Feb 16, 2023

I am able to reproduce the unhelpful conflict message in a clean virtual environment on Linux:

  1. python3.11 -m venv .venv
  2. source .venv/bin/activate
  3. pip install pip --update
  4. pip download mediapipe_model_maker -d downloads

Get the following error:

ERROR: Cannot install mediapipe-model-maker==0.1.0, mediapipe-model-maker==0.1.0.1 and mediapipe-model-maker==0.1.0.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    mediapipe-model-maker 0.1.0.2 depends on tensorflow>=2.10
    mediapipe-model-maker 0.1.0.1 depends on tensorflow>=2.10
    mediapipe-model-maker 0.1.0 depends on tensorflow>=2.10

There are other known conflict report bugs, e.g. #11009

In this case it looks like tensorflow does not support Python 3.11 and Pip never reports that that's the issue, I know other issues have been raised that touch on this but I can't find them right now.

For the actual issue of why you can not install I think you have already found out here: google-ai-edge/mediapipe#4088 (comment)

@notatallshaw
Copy link
Member

I wrote up a feature request in the past to report when there are no valid packages available: #10478

In that request I was specifically thinking about when pip can't build metadata, which is now a non-issue, but I think the feature in general would be helpful to any situation where Pip can't find a valid package for a given requirement to report in the conflict message.

@lucasjinreal
Copy link
Author

thanks, this now looks far more reasonable.

@notatallshaw
Copy link
Member

notatallshaw commented Feb 17, 2023

Going back through the issues I think this issue may be a duplicate of #10953 or at least closely related, in the sense that Pip is reporting a conflict but really it's a "package can not be found to solve requirement" for whatever reason.

@pradyunsg
Copy link
Member

Let's consolidate this one into that issue then. :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: support User Support
Projects
None yet
Development

No branches or pull requests

4 participants