Zappa 中 PyYAML 的 Pipenv 依赖错误

Pipenv dependency error with PyYAML in Zappa

在 pip env 上更新 zappa 包后出现错误

我试过了 pipenv lock --clear 然后重试安装 和 pipenv install --skip-lock

以下是 PyYAML 的pipenv graph --reverse

PyYAML==3.13
  - awscli==1.16.177 [requires: PyYAML>=3.10,<=3.13]
  - awsebcli==3.15.2 [requires: PyYAML>=3.10,<=3.13]
  - cfn-flip==1.2.0 [requires: PyYAML>=3.13b1]
    - troposphere==2.4.7 [requires: cfn-flip>=1.0.2]
      - zappa==0.48.2 [requires: troposphere>=1.9.0]
  - docker-compose==1.23.2 [requires: PyYAML>=3.10,<4]
    - awsebcli==3.15.2 [requires: docker-compose>=1.23.2,<1.24.0]
  - kappa==0.6.0 [requires: PyYAML>=3.11]
    - zappa==0.48.2 [requires: kappa==0.6.0]
  - zappa==0.48.2 [requires: PyYAML>=3.13]

错误信息如下,

ERROR: ERROR: Could not find a version that matches pyyaml<4,<=3.13,<=5.1,>=3.10,>=3.11,>=3.13,>=4.1
Tried: 3.10, 3.10, 3.11, 3.11, 3.12, 3.12, 3.12, 3.12, 3.12, 3.12, 3.12, 3.12, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 3.13, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1, 5.1.1, 5.1.1, 5.1.1, 5.1.1, 5.1.1, 5.1.1, 5.1.1, 5.1.1, 5.1.1, 5.1.1, 5.1.1
Skipped pre-versions: 3.13b1, 3.13b1, 3.13b1, 3.13b1, 3.13b1, 3.13b1, 3.13b1, 3.13b1, 3.13b1, 3.13b1, 3.13rc1, 3.13rc1, 3.13rc1, 3.13rc1, 3.13rc1, 3.13rc1, 3.13rc1, 3.13rc1, 3.13rc1, 3.13rc1, 3.13rc1, 4.2b1, 4.2b2, 4.2b4, 4.2b4, 4.2b4, 4.2b4, 4.2b4, 5.1b1, 5.1b3, 5.1b5, 5.1b5, 5.1b5, 5.1b5, 5.1b5, 5.1b5, 5.1b5, 5.1b5, 5.1b5, 5.1b5, 5.1b5, 5.1b7
There are incompatible versions in the resolved dependencies.

我没有尝试以下操作,因为我希望软件包稳定。 pipenv lock --pre

问题是awscliawsebcli需要pyyaml<=3.13,而cfn-flip(通过zappa,通过zappa)需要pyyaml>3.13b1pipenv install 也在跳过 pre-releases,pyyaml==3.131b 是其中之一。

您可以明确要求 troposphere 的版本早于 2.4.7,以便安装 pyyaml<=3.13 来解决此问题。