-
Notifications
You must be signed in to change notification settings - Fork 2.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
Parse wheel requirements Requires-Dist with platform markers | Torch 2.1.1+cu121 installation problem #8690
Comments
I think this features is connected with #8681 |
poetry builds cross-platform solutions. During locking, it doesn't matter that you're not on linux: poetry will still make sure that the lockfile it builds works on linux (and elsewhere). there are open issues - and even a pull request (#4952 probably abandoned) - suggesting a not-cross-platform option, but today it doesn't exist. so this is working as intended; and if you think it should change then that's a duplicate please close |
A: #4952 is about optimization and has another idea and resolvement. Not duplicate of it.
I don't understand clearly. Poetry does general purpose of installation and organizations environments in project. In my opinion it's like pip but better. I can install package via pip |
For now I see this as bug or error of poetry logic. |
In short, I want |
Ah, sorry, I misunderstood. But then the explanation is simple: the pytorch wheel that poetry looks at when deciding torch's dependencies contains different information. You can check for yourself, it's https://download.pytorch.org/whl/cu121/torch-2.1.1%2Bcu121-cp310-cp310-linux_x86_64.whl you'll need to raise this with pytorch, please close |
I downloaded this wheel.
I have already seen issues when you said raise problem on these projects because of wheel files. I think that is not effective problem solvement. But I am not sure that is there another way to fix it. |
Next:
So there is new question: Windows and linux wheel files are different. Which of them is read by poetry during locking? |
I have already answered this "new" question; and anyway it should by now be obvious - the dependencies that poetry reads while locking are the ones in the linux wheel |
OK. If poetry is CROSS-PLATFORM product, I don't understand why it uses ONLY LINUX wheel files? |
poetry makes the assumption that all wheels contain the same metadata, with platform-specific variation encoded in markers. The performance penalty of downloading all wheels and trying to deal with variation between them would make poetry unusable. pytorch has in fact been making progress towards this goal of uniform metadata - eg see the contents of that windows wheel - but plainly they aren't yet there. Again: you'll want to report this to them, please close this issue |
Interesting. With checking only universal format wheels you need to download less files. I agree. Then if you can not download both files in case of optimization. As new feature request, can we download current specific platform wheel file as input for uniform metadata. |
back where we started... if and when poetry has a feature for non-cross-platform lockfiles then what you suggest makes sense. But until then poetry is committed to the assumption that it doesn't matter which wheel it uses, it must get the same answer anyway. |
OK. I see the direction. If this assumption is always right there -> in every package must be ONLY 1 file of wheel per version because there is no reason to have 2nd. SO I see only 3 decisions:
|
I can't follow what you're saying but I don't think it matters. poetry assumes that all distributions of a particular version of a package contain the same metadata, and packages that don't fit in with this are not compatible with poetry. That is not likely to change. Happily nearly all packages do follow this assumption so this nearly always works out fine. You've unfortunately hit one of the exceptions. But the torch folk have been willing recently to try and do what is needed to make their wheels all contain the same metadata. I can only say - again - you should report this to them. I expect they'll want to put it right. |
I know that your rule is breaken by them.
With warning like: Downloading 2 versions of wheel files, cause package torch have not equal wheels for platforms Or maybe it's idea for plugin to support this problem. But I think it have to be in core. |
No. The problem that poetry has to solve is already hard enough: it becomes quite intractable if it is additionally necessary to reverse-engineer a set of markers that correspond to what we wish package authors had written in the first place. |
Ok. I think think I got answers on my questions. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
I am on Windows 10 and I don't need linux requirements.



Poetry
poetry show torch
shows that it need triton.Torch 2.1.1+cu121 and similiar versions has this format of Requires-Dist.
Can you implement support for these cases?
pyproject.toml
Unsatisfied but working temporary solution:
Downgrading to 2.0.1 with cu118. where there is no Requires-Dist for linux platform in torch package.
pyproject.toml
The text was updated successfully, but these errors were encountered: