-
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
More verbose explanation why "Could not find a version that satisfies the requirement" #6526
Comments
I later found the The "only two" reasons given were the:
|
+1 to this, maybe we can take inspirations from the hash mismatch error. The most difficult parts are probably to draft out the appropriate messages to show in each scenario, and to correctly detect the scenarios (easier if the scenarios are lined out well in the previous part). |
I happened to write up a comment on another issue with an idea on addressing this: #6121 (comment) |
@stdedos pip uses a vendored version of |
|
Yes, it is exactly the same (I have run that command already, but "a bit differently"): import pprint; import pip._internal; pprint.pprint(pip._internal.pep425tags.get_supported()) |
I am also facing this issue but I have a workaround |
i have this problem too. |
+1 on this. Right now I am getting the following:
As you see, the package already shows up in the versions listed |
I ran into the same problem, it occurred only when I ran commands from my Docker image (or Dockerfile). Finally many hours later I managed to solve it by updating my python intepreter. Pointed out that my pip-package required python>=3,7 but my Docker image was using python 3.6. Tip: To check out if you have similar problem, just check pip package requirements and your python version. Private pip package intepreter requirements are wrote down inside |
We definitely want to improve this -- the bit that needs discussion is how we'd improve this. The most common case seems to be... mismatching platforms / python-requires. |
As a follow up to #10501 I get the subject message when following procedure from |
Well, for a start, that URL https://developer.download.nvidia.com/compute/redist/jp/v46 gives a 404 for me... |
OK, we are making progress. If that is what pip sees also, |
It shows this, but only in verbose output ( Generally, if you get an unexpected result (in any tool, not just pip), enabling verbose or debug output is the recommended way of seeing what's going on, and it gives you the information you need here. Yes, it might be possible to do better (retain the responses we got, and if we can't find any suitable candidates, check them to see if there's anything worth reporting). But that's a lot of work for a relatively rare situation. A PR would be welcome, but it's unlikely to be a priority for the pip developers in the immediate future. |
Very useful information. I was not aware of -vv. |
Getting the information correct in the book would also have helped, I guess 🙁 From what I can tell, tensorflow is a whole complicated ecosystem of its own, so you have my sympathy. As I said, though, a PR would be welcomed if there's an improvement you think might have helped with how we report the problem. |
Yea... To me, it looks like these docs are out of date; and the best folks to reach out to would be folks at NVIDIA. Sadly, I don't know what the best channel or mechanism to do so would be. |
I have resolved my issue with pip install error message: Conclusion: the pip wheel definitions seem to be very restrictive. My background is with IBM systems. Thanks again for all the help offered. The ubuntu world is full of very |
I think one of the UX issues here is that the same "Could not find a version that satisfies the requirement X" message is actually shown for two distinct scenarios:
...and the current message reads as though it's saying (1) is always the case - and it requires knowing how Python packaging/PyPI/pip works to know that (2) is also a possibility. This issue seems to be blocked on trying to come up with all the sub-permutations of scenario (2), and having precise error messages for each (eg listing Python version as the issue, and showing compatible versions). However, I think most of the UX benefit could still be achieved via a simpler single generic message for scenario (2), that doesn't require as many design decisions or implementing tags parsing/analysis etc, and so be quicker to implement. This could initially just be a stop-gap, but we might find it actually solves the problem well enough that we don't need the more complex solution. Example generic error message for (2): |
Ah I see the Python versions case specifically is now handled, via #9708. Example output (when using Python 3.7 and a package that has dropped support for 3.7):
The case I saw more recently that still had confusing UX, was for a platform mismatch (a user trying to install a Windows package on Linux): |
That seems pretty rare - it means there's no sdist and no wheel for that platform. Unless you use So while I could see the advantage in a clearer message, I don't think it would matter as often as you'd think at first. |
I agree the platform case will be rare, and so low priority. |
I’m going to just close this in favour of #10421. This specific error message comes from the legacy resolver and is not going to be improved upon. The newer issue provides more relevant context toward the issue in its current state, against the current resolver implementation. |
Environment
Description
I have spent hours trying to debug, what does this mean:
While I was able to:
pip
was pulling my leg: [1]Something started stricking me, when I saw a whole lot of
.tar.gz
instead of-?py2.?py3-?????-????.whl
files getting pulledAfter searching the internet without avail, I found #3969 this, and then things started falling in place as to "why" my python so forcefully resisted installing https://files.pythonhosted.org/packages/5f/bf/6aa1925384c23ffeb579e97a5569eb9abce41b6310b329352b8252cee1c3/cffi-1.12.3-cp36-cp36m-manylinux1_x86_64.whl
Expected behavior
I would like to have a very precise indication as to "why" something "is not found".
pip clearly found the
version
andarch
it wanted, it was just not happy with themanylinux1
"tag".e.g. pip could've said:
How to Reproduce
Output
[1]: I am considering if that would be a bug. What's
pip
s deal, "not" accepting a self-compiled, pre-installed depenedency? Why would it "mandatorily" need to pull it ascffi-1.12.3-cp36-cp36m-manylinux1_x86_64.whl
, and not be satisfied by "just" compiling it (or having "me" jump through hoops to make it appear inpip list
)?The text was updated successfully, but these errors were encountered: