python - Pipenv:即使使用 pipenv lock --clear 也无法解决依赖关系
问题描述
我正在使用 pipenv 版本“2018.7.1”和 pip 18.0。
我有一个Pipfile
并运行pipenv install
.
它失败了:
Could not find a version that matches prompt-toolkit<2.0.0,<2.1.0,==2.0.7,>=1.0.0,>=1.0.4,>=2.0.0
Tried: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.25, 0.26, 0.28, 0.30, 0.31, 0.32, 0.32, 0.32, 0.33, 0.33, 0.33, 0.34, 0.34, 0.34, 0.35, 0.35, 0.35, 0.36, 0.36, 0.36, 0.37, 0.37, 0.37, 0.38, 0.38, 0.38, 0.39, 0.39, 0.39, 0.40, 0.40, 0.40, 0.41, 0.41, 0.41, 0.42, 0.42, 0.42, 0.43, 0.43, 0.43, 0.44, 0.44, 0.44, 0.45, 0.45, 0.45, 0.46, 0.46, 0.46, 0.47, 0.47, 0.47, 0.48, 0.48, 0.48, 0.49, 0.49, 0.49, 0.50, 0.50, 0.50, 0.51, 0.51, 0.51, 0.52, 0.52, 0.52, 0.53, 0.53, 0.53, 0.54, 0.54, 0.54, 0.55, 0.55, 0.55, 0.56, 0.56, 0.56, 0.57, 0.57, 0.57, 0.58, 0.58, 0.58, 0.59, 0.59, 0.59, 0.60, 0.60, 0.60, 1.0.0, 1.0.0, 1.0.0, 1.0.1, 1.0.1, 1.0.1, 1.0.2, 1.0.2, 1.0.2, 1.0.3, 1.0.3, 1.0.3, 1.0.4, 1.0.4, 1.0.4, 1.0.5, 1.0.5, 1.0.5, 1.0.6, 1.0.6, 1.0.6, 1.0.7, 1.0.7, 1.0.7, 1.0.8, 1.0.8, 1.0.8, 1.0.9, 1.0.9, 1.0.9, 1.0.10, 1.0.10, 1.0.10, 1.0.13, 1.0.13, 1.0.13, 1.0.14, 1.0.14, 1.0.14, 1.0.15, 1.0.15, 1.0.15, 2.0.1, 2.0.1, 2.0.1, 2.0.2, 2.0.2, 2.0.2, 2.0.3, 2.0.3, 2.0.3, 2.0.4, 2.0.4, 2.0.4, 2.0.5, 2.0.5, 2.0.5, 2.0.6, 2.0.6, 2.0.6, 2.0.7, 2.0.7, 2.0.7
There are incompatible versions in the resolved dependencies.
我检查了 https://pipenv.readthedocs.io/en/latest/diagnose/他们建议尝试
pipenv lock --clear
和/或清除整个缓存目录。我都尝试了,但得到与上面相同的错误。我检查结果
pipenv graph
并看到所有对prompt-toolkit
(失败的依赖项)的引用看起来像:
- prompt-toolkit [required: >=1.0.4,<2.0.0, installed: 1.0.15]
.
所以现在我非常困惑,因为看起来根本不应该存在依赖冲突。任何想法为什么会发生这种情况以及如何解决?
解决方案
如果您忽略了任何提到的依赖关系,Peilonrayz 的回答会很棒。正如您所提到的,有时pipenv
不会显示影响可解析性的子依赖项。
尝试使用pipenv lock -clear -verbose
,您还将获得有关子依赖项的信息。您可以在它们中搜索'==2.0.7'
(这看起来是您的“缺失”依赖项。一旦找到要求的子依赖项,'==2.0.7'
您就可以解决问题。
推荐阅读
- sql - 如何在 SQL 中将字符串值乘以 longint
- java - 无法在属性文件中显示验证错误消息
- c - 用 C 语言编写一个程序来读取和打印一个班级的 n 个学生的名字
- asp.net-core - 在 Blazor Web Assembly 项目中使用 SASS 的最佳方式是什么?
- c# - 如何在c#中获取执行命令窗口
- reactjs - 多步表单问题
- c# - TLS/SSL RABBIT MQ (Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..)
- tsql - 比较 2 个字符串并获得匹配 - T SQL
- sql - 在 2 个表之间结合 row_num 和 group by
- http - 后端不响应 HTTP 请求