Closed goyalyashpal closed 3 weeks ago
- if
pip
is able toinstall
tensorflow>=2.16
then why can't pdm fetch that?
pip
is resolving for the current platform but PDM is resolving for multiple platforms. Read more: https://frostming.com/en/2024/pdm-lockfile/
You can do pdm lock -S no_cross_platform
to replicate pip's behavior.
thanks for "closing as not planned" ๐
thanks for "closing as not planned" ๐
you are welcome. or what should I do otherwise?
i have seen many projects arrogantly close even non planned issues as completed.
so i always thanks those who dont do such weird things.
I am myself often unsure if I should close an issue as "completed" or "not planned" :thinking: Sometimes won't fix, can't repro, duplicate, or stale do not really apply :thinking: What's your reasoning when choosing not planned or completed @goyalyashpal :slightly_smiling_face:? Curious to see how others handle that.
if a proper solution exists, and author agrees (indicated by yes, this is what i needed etc) then "completed"
if workaround etc is required (like here), out of scope, out of plan, not enough resources (will, time, power, knowledge), technical or code debt, etc etc etc then "not planned"
but PDM is resolving for multiple platforms
just sharing for reference the following para of how micromamba addresses this:
Using conda-lock, you can generate lockfiles which, - ..., pin precisely and include a checksum for each package for reproducibility. - [... also] , these โunifiedโ lock files are multi-platform.
- #conda-lock-yaml-spec-files | Micromamba User Guide
Not planned means no offense, if so, GitHub should remove this option.
I close as completed when there is any action taken(docs/code) on the maintainers' side, otherwise not planned, including Q&A
You can do
pdm lock -S no_cross_platform
to replicate pip's behavior. - @ frostming at https://github.com/pdm-project/pdm/issues/2867#issuecomment-2097979784
can that be specified in pyproject.toml
?
can that be specified in
pyproject.toml
?
[tool.pdm.options]
lock = ["-S", "no_cross_platform"]
Summaries & Titles
platform_system ==
"Darwin"
|"Linux"
used on Win10 โpdm add tensorflow>=2.16
failspdm add
usesplatform_system ==
"Darwin"
or"Linux"
on Win10 os hencepdm
fails to resolvetensorflow
totensorflow-intel
packagepdm add tensorflow>=2.16
fails,pip install tensorflow>=2.16
succeeds on windowsSteps to reproduce
pdm lock
with pyproject.toml having specifics as given:Actual behavior
normal output
``` ๐ Lock failed ERROR: Unable to find a resolution for tensorflow-cpu-aws because of the following conflicts: tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" (from tensorflow@2.16.1) To fix this, you could loosen the dependency version constraints in pyproject.toml. See https://pdm-project.org/en/latest/usage/lockfile/#solve-the-locking-failure for more details. See $LOCALAPPDATA\pdm\pdm\Logs\pdm-lock-kt_3eb6f.log for detailed debug log. [ResolutionImpossible]: Unable to find a resolution WARNING: Add '-v' to see the detailed traceback ```verbose status
``` STATUS: Resolving dependencies pdm.termui: ======== Start resolving requirements ======== pdm.termui: tensorflow>=2.16 pdm.termui: python<3.13,>=3.12 pdm.termui: Adding requirement tensorflow>=2.16 pdm.termui: Adding requirement python<3.13,>=3.12 pdm.termui: ======== Starting round 0 ======== STATUS: Resolving: new pin python<3.13,>=3.12 pdm.termui: Pinning: python None pdm.termui: ======== Ending round 0 ======== pdm.termui: ======== Starting round 1 ======== pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Adding requirement tensorflow==2.16.1; platform_system == "Darwin" and platform_machine == "arm64"(from tensorflow 2.16.1) pdm.termui: Adding requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux"(from tensorflow 2.16.1) pdm.termui: Candidate rejected: tensorflow@2.16.1 because it introduces a new requirement tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" that conflicts with other requirements: pdm.termui: Conflicts detected: tensorflow-cpu-aws==2.16.1; (platform_machine == "arm64" or platform_machine == "aarch64") and platform_system == "Linux" (from tensorflow@2.16.1) ```
verbose traceback
``` Traceback (most recent call last): File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "$USERPROFILE\.local\bin\pdm.exe\__main__.py", line 7, in
File "D:\UserFiles\pipx\venvs\pdm\Lib\site-packages\pdm\core.py", line 358, in main
return core.main(args or sys.argv[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\UserFiles\pipx\venvs\pdm\Lib\site-packages\pdm\core.py", line 276, in main
raise cast(Exception, err).with_traceback(traceback) from None
File "D:\UserFiles\pipx\venvs\pdm\Lib\site-packages\pdm\core.py", line 271, in main
self.handle(project, options)
File "D:\UserFiles\pipx\venvs\pdm\Lib\site-packages\pdm\core.py", line 207, in handle
command.handle(project, options)
File "D:\...\.pdm-plugins\Lib\site-packages\pdm_conda\cli\commands\lock.py", line 31, in handle
super().handle(project=project, options=options)
File "D:\UserFiles\pipx\venvs\pdm\Lib\site-packages\pdm\cli\commands\lock.py", line 92, in handle
actions.do_lock(
File "D:\UserFiles\pipx\venvs\pdm\Lib\site-packages\pdm\cli\actions.py", line
125, in do_lock
raise ResolutionImpossible("Unable to find a resolution") from None
resolvelib.resolvers.ResolutionImpossible: Unable to find a resolution
```
Expected behavior
pip
is able toinstall
tensorflow>=2.16
then why can't pdm fetch that?tensorflow_intel-2.16.1-cp310-cp310-win_amd64.whl (376.9 MB)
tensorflow-intel->tensorflow
Environment Information