Pipenv: 使用 pytest-cov 安装 pytest 时无法解决依赖关系

创建于 2018-08-01  ·  3评论  ·  资料来源: pypa/pipenv

问题描述

我无法安装 pytest 和 pytest-cov,因为它抱怨依赖项没有得到解决。

复制和输出的步骤

我的文件

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pytest = "*"
pytest-cov = "*"

[dev-packages]

[requires]
python_version = "3.6"
 $ pipenv install
Pipfile.lock (ca72e7) out of date, updating to (4ccbf7)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...

Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
Could not find a version that matches pluggy<0.7,>=0.5,>=0.7
Tried: 0.3.0, 0.3.0, 0.3.1, 0.3.1, 0.4.0, 0.4.0, 0.5.0, 0.5.1, 0.5.1, 0.5.2, 0.5.2, 0.6.0, 0.6.0, 0.6.0, 0.7.1, 0.7.1
There are incompatible versions in the resolved dependencies.

然后我做一个:

$ pipenv install --skip-lock
$ pipenv graph
pytest-cov==2.5.1
  - coverage [required: >=3.7.1, installed: 4.5.1]
  - pytest [required: >=2.6.0, installed: 3.7.0]
    - atomicwrites [required: >=1.0, installed: 1.1.5]
    - attrs [required: >=17.4.0, installed: 18.1.0]
    - more-itertools [required: >=4.0.0, installed: 4.3.0]
      - six [required: >=1.0.0,<2.0.0, installed: 1.11.0]
    - pluggy [required: >=0.7, installed: 0.7.1]
    - py [required: >=1.5.0, installed: 1.5.4]
    - setuptools [required: Any, installed: 40.0.0]
    - six [required: >=1.10.0, installed: 1.11.0]

依赖看起来不错。

最有用的评论

这真的应该关闭吗? 我认为 pipenv 方面有一些可能的改进:

  • 向用户解释哪些包解决了给定的约束,以解释为什么会发生这种情况
  • 给用户一些提示该怎么做:a)运行锁定清除,b)其他事情等

所有3条评论

pipenv lock --clear会解决这个问题

这真的应该关闭吗? 我认为 pipenv 方面有一些可能的改进:

  • 向用户解释哪些包解决了给定的约束,以解释为什么会发生这种情况
  • 给用户一些提示该怎么做:a)运行锁定清除,b)其他事情等

哦: https :

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

konstin picture konstin  ·  3评论

randName picture randName  ·  3评论

hynek picture hynek  ·  3评论

leileigong picture leileigong  ·  3评论

jerzyk picture jerzyk  ·  3评论