pdm list 打印出的信息 有些反直觉
pyproject.toml
[project]
name = "flow-111"
version = "0.1.0"
description = "Default template for PDM package"
dependencies = [
"curl-cffi>=0.7.3",
"pydantic>=2.9.2",
"jupyterlab>=4.2.5",
"plotly>=5.24.1",
"pandas>=2.2.3",
]
requires-python = "==3.12.*"
readme = "README.md"
license = {text = "MIT"}
[tool.pdm]
distribution = false
情况描述
当我使用 pdm list 的时候,列出了 几十个包,太多了, 其实我只想看看 我现在安装的包的版本号
期待的解决方案
pdm list 只检测出 在我 pyproject.toml 文件 的 dependencies配置里 的包 和它们的版本号, 可以通过添加参数 --include-sub 查看 包含子包的情况
参考
https://github.com/pdm-project/pdm/pull/3219
pdm outdated 我觉得也可以这样处理 , 默认 只检测 dependencies 配置里 的包
pdm 很多命令, 默认情况,建议只作用于 dependencies 配置里 的包, 可通过添加额外参数 --include-sub 来 包含 子包
No, that is different, pdm list only cares about "what packages you have installed" and not about what dependencies you specified in the project. Like you can initialize an empty project with an existing venv and run pdm list to list what is installed in that venv. This has the same function as pip list or conda list.