Help, how to manage different dependencies depending on Python version with PDM #1657
Unanswered
zEdS15B3GCwq
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This is an unresolved problem #46 . It is long-hanging since it needs non-trivial effort(possibly rewrite) on the resolver. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm new to PDM. Trying to figure out how to manage a library project that should work with
Python >=3.8
and has a dependency that's exclusive for certain versions. More specifically, the dependencytobii-research 1.10.2
supports only Python 3.10, whereas version1.10.1
only supports Python 3.8.Python 3.8
--> tobii-research 1.10.1
Python 3.10
--> tobii-research 1.10.2
I know from the docs how to create separate virtual environments with
pdm venv create
and how to switch the currently used Python version withpdm use
, but I cannot figure out how to add one version of tobii-research in one, and another version in the other. Thepyproject.toml
and lock files can't contain multiple versions of the same package, can they? So do I need multiple versions of these?Another issue is that PDM cannot seem to identify which version of tobii-research to use for Python 3.8. It only finds out that 1.10.2 is incompatible with Python 3.8, and instead of stepping down a version to 1.10.1, it gives up. I can manually direct it to use tobii-research==1.10.1, but I was hoping that a dependency manager could find the right version automatically. Am I perhaps using PDM wrong?
Beta Was this translation helpful? Give feedback.
All reactions