-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Error in requirements.txt dependency resolution #7362
Comments
I think the version is being set by another package https://github.com/spatialaudio/nbsphinx/blob/4c00890ed2a5bdf28981f87321bc11a1a2bfb3ef/setup.py#L22 maybe? What about listing the
Not sure about that, is that something new introduced in the latest version of pip? |
Thanks for looking into this!
I didn't think so, because it's I'm quite sure the reason for the initial choice of version The requirement
I wouldn't expect that changing anything, but I tried it anyway (in a different project), and it works! https://readthedocs.org/projects/jupyter-format/builds/11603286/ I've also tried it with the original project, and lo and behold, it work as well: https://readthedocs.org/projects/mg/builds/11603351/ To be extra sure, I moved the https://readthedocs.org/projects/mg/builds/11603409/ But I still don't understand why that's the case ... do you have an idea?
No idea. It's the first time I've seen this message. But that doesn't mean much. |
I don't really have an explanation, just saw the first packages were defining the sphinx version from a lower point so maybe pip got confused? But that's unexpected for sure. I'll try to replicate this locally, maybe this is due to some options we set to pip? |
OK, I was able to replicate this locally pip install --upgrade pip
pip install "Sphinx<2.0"
pip install -r test.txt Where test.txt is
And what I got was
I think this is going to break some builds for sure... We'll need to take a look and see how this can be solved. |
But maybe this is a bug from pip since it works just fine changing the order (outside rtd)... |
Thanks for the exploration, that's very interesting. I could reduce the test case to these two requirements:
If I change the order it works as expected:
So far so good. Now I tried the command line option suggested in the error message:
And it works! So it looks like the current It's probably not a good idea to use the new resolver by default on RTD, because it still seems to be under development. I guess we'll just have to wait until October ... or for RTD to drop the |
PS: some more reading material: https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-2-2020 Here's an issue from 2013: pypa/pip#988. |
Thanks for the links, so, we are planning to install sphinx<3 by default, but not matter the sphinx version we pin, pip will give that error on some circumstances.
With that users won't have to worry about previous installed packages by rtd. I think you may want to report this issue upstream, but not sure since it's already fixed in the new resolver 🤷♂️ and we are not so far from October at least if the world doesn't end. |
That's not quite true (currently), as our experiments above have shown. The same requirements in If But I think this problem will go away in October.
AFAIU, this issue is known at least since 2013, I don't think I have anything to add to the error description. I think I'll just wait a few months ... |
I'm closing this since it's a pip issue and hopefully will be fixed in the next month. We will always install some libraries before the ones the user installs, as we require some for our features to work. Feel free to ask to reopen if the problem doesn't go away when the new pip resolver is used by default. |
Just a quick confirmation: this issue indeed seems to be fixed, the original problem doesn't appear anymore! |
When my
requirements.txt
doesn't directly mention a Sphinx version but contains a Python package (in my caseinsipid-sphinx-theme
) that depends on a Sphinx version > 2, this is ignored and the version selected by RTD is used (1.8.5
).I'm getting this error message:
I don't know whether the
2020-resolver
feature has anything to do with this behavior or not (maybe this will work as expected in the future?).Details
Expected Result
I expect the nested (transitive) dependencies from
requirements.txt
to overrule the package versions installed by RTD.Actual Result
The Sphinx version requested by RTD (
<2
) is used instead of the one requested by a package inrequirements.txt
(>=3.1.2
).If I directly write
Sphinx>=3.1.2
intorequirements.txt
it works as expected.The text was updated successfully, but these errors were encountered: