Recommended way for multi-platform dependencies from different indexes? #2430
-
I'm developing a PyTorch project on a Mac, and I would like to be able to handle via PDM the lockfile(s) needed to handle running the project on arm64 Mac, amd64 Linux, and amd64 Linux with CUDA. For all packages except My ideal solution would be for Continuing, I tried specifying different
But that is a conflict of dependencies, apparently, between these 2 optional Then I found that there was a suggested way to pin a specific wheel. This is not very ergonomic, and I also am not sure how it would even work if I got a dependency conflict with the same thing in different optional groups. Further in that discussion, however, #696 is referenced for
Running
And that kind-of worked, inasmuch as getting
But this does present a few separate questions, that I cannot answer on my own at the moment:
I don't mind generating platform-specific lock files, if that is possible, but I would strongly prefer to be able to solve this out of a single |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I've done some further testing, and I think I did something not too carefully in my earlier testing. Using this in my
|
Beta Was this translation helpful? Give feedback.
-
Submitted the ticket in pdm for this Also tried this with uv (my first experience with this tool and sadly - it was shining in this task): tried uv sync on linux and Mac - all works as expected |
Beta Was this translation helpful? Give feedback.
-
pdm actually supports this fine, just documentation is a bit confusing. Check my comment here: this is a solution on pdm:
And then:
This gives multiplatform lock file |
Beta Was this translation helpful? Give feedback.
Submitted the ticket in pdm for this
#3394
Also tried this with uv (my first experience with this tool and sadly - it was shining in this task):
https://gist.github.com/zhukovgreen/923be42feb2f1d648da4057399b6148f
tried uv sync on linux and Mac - all works as expected