-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 install --upgrade randomly skips upgrading a dependency leading to dependency errors #8218
Comments
Related: #8115 |
@uranusjr Do you think there is a way to stabilize pip install --upgrade behavior? |
@Ark-kun The problem should be fixed in the new resolver - can you confirm if |
I've checked and the new resolver just fails. This is understandable, since some other dependencies (not the unstable one) are incompatible. https://travis-ci.com/github/kubeflow/pipelines/jobs/338350956#L2500
|
Is it possible to make pip be deterministic at least? There is a ~66% chance that this would lead to success for us. |
@pfmoore I just ran into this same issue, except the upgrade was less likely to happen (most of our dependencies depend on numpy). Locally, |
@Ark-kun Could you try it again with the new resolver |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
Environment
Description
We have presubmit tests in Travis that test our python SDK and some other projects that depend on our SDK.
Recently the tests started getting flaky. Tests for changes that do not change the code (e.g. change README) sometimes pass and sometimes fail. I've compared the successful and failing runs and noticed what seems to be a randomly-triggered bug in
pip install --upgrade
behavior.When installing a wheel we want to test, some of its dependencies depend on the
numpy
. Most depend onnumpy<2,>=1.16
, but one dependency also supports older versionsnumpy<2,>=1.14.3
. The environment where the installation runs hasnumpy-1.15.4
- enough for one dependency, fut too old for others.We observe that
pip install --upgrade
randomly skips upgrading numpy which leads to broken dependencies that pip install reports in the end.Expected behavior
I expect
pip install --upgrade
have deterministic behavior.I expect that
pip install --upgrade
, when installing multiple dependencies requiring a different minimum version of some package, will eventually install a package version which satisfies all min version requirements.I understand that pip does not do full dependency resolution. But given
A requires p>=1; B requires p>=2; C requires p>=3;
I expectp>=3
to be installed eventually.Actual behavior
We observe what amounts to pip only checking a package requirement once (randomly selected) and if the requirement is satisfied it ignores other requirements.
I.e. sometimes it would work as expected:
and sometimes it would
How to Reproduce
Working on PoC.... It's a bit complicated since it involves
git clone
,setup.py bdist_wheel
and thenpip install
.Output
Works:
Does not work:
The full failed log can be currently found at https://travis-ci.com/github/kubeflow/pipelines/jobs/331132675, but it will go away soon.
The text was updated successfully, but these errors were encountered: