-
Notifications
You must be signed in to change notification settings - Fork 3k
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
pip's dependency resolver doesn't resolve the conflict #9548
Comments
Do you still have this problem or can you reproduce it? Several improvements have happened to Pip's dependency resolver since you posted this, including just recently Pip main (28239f9) has sarugaku/resolvelib#111 and sarugaku/resolvelib#113. I haven't been able to reproduce any other long backtracking issue with these improvements. In a clean virtual environment can you retry by installing Pip like so: |
I've also encountered the "pip is looking at multiple versions ..." message when compiling requirements with I thought it might just be my local installation and created a GitHub workflow to compile the requirements for reproducibility (see testcontainers/testcontainers-python#331 for details). An example build is available here. The process takes less than a minute for 3.7 through 3.10. For 3.11, the process fails after about 18 mins because a package with python2 syntax is downloaded which causes a syntax error. Unfortunately, the requirements of the testcontainers package don't constitute a minimal reproducible example, but hopefully a reproducible example is nevertheless useful. |
Do you have a way to reproduce this using I tried the following: $ python3.11 -m venv .venv
$ source .venv/bin/activate
$ pip install pip --upgrade
$ git clone https://github.com/testcontainers/testcontainers-python
$ cd testcontainers-python/
$ pip install -r requirements/3.11.txt And it gave me the error:
|
Yes, sorry, the PR testcontainers/testcontainers-python#331 drops the codecov requirement (the python package was deleted from pip recently so the master build fails). Checking out the branch from testcontainers/testcontainers-python#331 should hopefully work. I'll also try with pip as you suggested. |
The culprit appears to be an old version of google-cloud-pubsub we depend on (our package desperately needs updating). But the following snippet reproduces the result without using pip-compile (I use the --platform flag because I'm using an M1 mac).
|
For me this creates some backtracking but on my machine it resolves in ~10 seconds, is this what you see or is it worse? Actually this is one of the situations where the total wall time appears to get worse not better for pip main taking ~20 seconds on my machine, it's doing less backtracking but the build steps themselves are taking longer, perhaps there's been some changes to way the build isolation work, |
It takes two minutes for me but the dependencies do eventually get resolved. I've attached the full logs below. Edit: I've updated the master branch to remove pip install in docker container
|
I diffed, I get identical output but it only takes a ~15 seconds on my machine. It is less backtracking on pip main though so hopefully it should be faster for you once pip updates to 23.1+.
Now |
Great, will make sure to stay up to date with the latest pip version.
I bit the bullet and finally updated the Thank you for the speedy and detailed input! 🙏 |
Unfortunately without a clear reproduction case, this issue remains unactionable. If anyone has a relatively easy to run example where pip's dependency resolver resolves suboptimally, please let us know! |
Suggestions for anyone dealing with slow resolution to 1) upgrade pip1, and 2) read https://pip.pypa.io/en/stable/topics/dependency-resolution/. Footnotes |
I've been trying to install a package through pip on my rpi 3 model B.
my operating system is raspbian . debian based pip version is 21.0.1 and python version is 3.7.4 the command I'm using is:
python3 -m pip install librosa
the problem is that the dependency resolver takes way too long to resolve the conflicts. and after a few hours it keeps repeating this line over and over again for hours ( I even left the installation running for 2 days over nights )
I've tried using a stricter constraint such as adding "numpy > 1.20.0" and other stuff but now the popped up and I have no clue what I can do now.
would appreciate if anyone can provide a solution. thanks in advance.
The text was updated successfully, but these errors were encountered: