gpt4 book ai didi

python - 特定包版本的 pip 依赖树

转载 作者:行者123 更新时间:2023-12-05 02:07:34 27 4
gpt4 key购买 nike

我试图查看特定包所需的所有依赖项(在本例中我使用的是 pipdeptree),但事实证明它只显示了已安装包的依赖项树。假设我使用的是 graphene:2.1.0,例如:

$ pipdeptree -p graphene

Warning!!! Possibly conflicting dependencies found:
* graphql-relay==0.5.0
- graphql-core [required: >=0.5.0,<2, installed: 2.3.1]
* social-auth-core==3.2.0
- requests [required: >=2.9.1, installed: 2.8.1]
------------------------------------------------------------------------

现在,当我尝试 $ pipdeptree -p graphene==40.0.2(它不存在)时。

Warning!!! Possibly conflicting dependencies found:
* graphql-relay==0.5.0
- graphql-core [required: >=0.5.0,<2, installed: 2.3.1]
* social-auth-core==3.2.0
- requests [required: >=2.9.1, installed: 2.8.1]
------------------------------------------------------------------------

它似乎只考虑了一个稳定版本,我想要的是一个与我通过控制台提供的特定版本相关的依赖树,我希望我对此很清楚。

最佳答案

我相信johnnydep可以提供帮助:

$ johnnydep --verbose 0 'graphene==2.1.0'
name summary
------------------------------ ---------------------------------------
graphene==2.1.0 GraphQL Framework for Python
├── aniso8601<4,>=3 A library for parsing ISO 8601 strings.
├── graphql-core<3,>=2.0 GraphQL implementation for Python
│ ├── promise<3,>=2.3 Promises/A+ implementation for Python
│ │ └── six Python 2 and 3 compatibility utilities
│ ├── rx<2,>=1.6 Reactive Extensions (Rx) for Python
│ └── six>=1.10.0 Python 2 and 3 compatibility utilities
├── graphql-relay<1,>=0.4.5 Relay implementation for Python
│ ├── graphql-core<2,>=0.5.0 GraphQL implementation for Python
│ │ ├── promise>=2.0 Promises/A+ implementation for Python
│ │ │ └── six Python 2 and 3 compatibility utilities
│ │ └── six>=1.10.0 Python 2 and 3 compatibility utilities
│ ├── promise>=0.4.0 Promises/A+ implementation for Python
│ │ └── six Python 2 and 3 compatibility utilities
│ └── six>=1.10.0 Python 2 and 3 compatibility utilities
├── promise<3,>=2.1 Promises/A+ implementation for Python
│ └── six Python 2 and 3 compatibility utilities
└── six<2,>=1.10.0 Python 2 and 3 compatibility utilities

关于python - 特定包版本的 pip 依赖树,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61659555/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com