How to resolve Python package depencencies with pipenv?

后端 未结 12 2528
余生分开走
余生分开走 2020-12-13 06:35

I am using pipenv to handle a Python package dependencies.

The Python package is using two packages (named pckg1 and pckg2) that relies on

12条回答
  •  没有蜡笔的小新
    2020-12-13 07:02

    I have the similar issue with google-cloud-core.

    $ pipenv lock
    Locking [dev-packages] dependencies…
    Locking [packages] dependencies…
    
    Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
      First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
     Alternatively, 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 google-cloud-core<0.29dev,<0.30dev,>=0.28.0,>=0.29.0
    Tried: 0.20.0, 0.20.0, 0.21.0, 0.21.0, 0.22.0, 0.22.0, 0.22.1, 0.22.1, 0.23.0, 0.23.0, 0.23.1, 0.23.1, 0.24.0, 0.24.0, 0.24.1, 0.24.1, 0.25.0, 0.25.0, 0.26.0, 0.26.0, 0.27.0, 0.27.0, 0.27.1, 0.27.1, 0.28.0, 0.28.0, 0.28.1, 0.28.1, 0.29.0, 0.29.0
    There are incompatible versions in the resolved dependencies.
    

    It was solved by

    1. rm -rf Pipfile.lock
    2. pipenv update

提交回复
热议问题