<legend id='VHcrN'><style id='VHcrN'><dir id='VHcrN'><q id='VHcrN'></q></dir></style></legend>
<i id='VHcrN'><tr id='VHcrN'><dt id='VHcrN'><q id='VHcrN'><span id='VHcrN'><b id='VHcrN'><form id='VHcrN'><ins id='VHcrN'></ins><ul id='VHcrN'></ul><sub id='VHcrN'></sub></form><legend id='VHcrN'></legend><bdo id='VHcrN'><pre id='VHcrN'><center id='VHcrN'></center></pre></bdo></b><th id='VHcrN'></th></span></q></dt></tr></i><div id='VHcrN'><tfoot id='VHcrN'></tfoot><dl id='VHcrN'><fieldset id='VHcrN'></fieldset></dl></div>

<small id='VHcrN'></small><noframes id='VHcrN'>

        <bdo id='VHcrN'></bdo><ul id='VHcrN'></ul>
    1. <tfoot id='VHcrN'></tfoot>
      1. 如何使用 pipenv 解决 Python 包依赖关系?

        时间:2023-07-06

              <i id='Urrz2'><tr id='Urrz2'><dt id='Urrz2'><q id='Urrz2'><span id='Urrz2'><b id='Urrz2'><form id='Urrz2'><ins id='Urrz2'></ins><ul id='Urrz2'></ul><sub id='Urrz2'></sub></form><legend id='Urrz2'></legend><bdo id='Urrz2'><pre id='Urrz2'><center id='Urrz2'></center></pre></bdo></b><th id='Urrz2'></th></span></q></dt></tr></i><div id='Urrz2'><tfoot id='Urrz2'></tfoot><dl id='Urrz2'><fieldset id='Urrz2'></fieldset></dl></div>

                <tbody id='Urrz2'></tbody>

                <bdo id='Urrz2'></bdo><ul id='Urrz2'></ul>

                <small id='Urrz2'></small><noframes id='Urrz2'>

              • <legend id='Urrz2'><style id='Urrz2'><dir id='Urrz2'><q id='Urrz2'></q></dir></style></legend>
                • <tfoot id='Urrz2'></tfoot>
                  本文介绍了如何使用 pipenv 解决 Python 包依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 pipenv 来处理 Python 包依赖项.

                  I am using pipenv to handle Python package dependencies.

                  Python 包正在使用两个包(名为 pckg1pckg2),它们依赖于同一个名为 pckg3 的包,但是来自两个不同的版本.显示依赖树:

                  The Python package is using two packages (named pckg1 and pckg2) that rely on the same package named pckg3, but from two different versions. Showing the dependency tree :

                  $ pipenv graph
                    pckg1==3.0.0
                      - pckg3 [required: >=4.1.0]
                    pckg2==1.0.2
                      - pckg3 [required: ==4.0.11]
                  

                  尝试安装依赖项:

                  $ pipenv install
                  
                  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 pckg3==4.0.11,==4.1.0,>=4.1.0 (from -r C:UsersuserAppDataLocalTemppipenv-o7uxm080-requirementspipenv-hwekv7dc-constraints.txt (line 2))
                  Tried: 3.3.1, 3.3.2, 3.3.3, 3.4.0, 3.4.2, 4.0.0, 4.0.0, 4.0.1, 4.0.1, 4.0.2, 4.0.2, 4.0.3, 4.0.3, 4.0.4, 4.0.4, 4.0.6, 4.0.6, 4.0.8, 4.0.8, 4.0.9, 4.0.9, 4.0.10, 4.0.10, 4.0.11, 4.0.11, 4.1.0, 4.1.0, 4.1.1, 4.1.1, 4.1.2, 4.1.2, 4.2.1, 4.2.1, 4.3.0, 4.3.0
                  There are incompatible versions in the resolved dependencies.
                  

                  按照建议,pip install --skip-lock 可以解决问题,但依赖关系树仍未解决.

                  As suggested, pip install --skip-lock does the trick, but the dependency tree is still unresolved.

                  我很想告诉 Pipev 覆盖 pckg2 的要求,并指定 pckg3>=4.1.0.

                  I would love to tell Pipenv to override pckg2's requirement, and specify pckg3>=4.1.0.

                  如何解决?

                  推荐答案

                  我经常收到这个错误.每次清除锁定文件中的缓存都很有效.

                  I get that error constantly. Clearing the cache in the lock file works beautifully every time.

                  $ pipenv lock --pre --clear

                  这篇关于如何使用 pipenv 解决 Python 包依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Django 应用程序依赖循环 下一篇:pip 需求文件中的可选依赖项

                  相关文章

                    <small id='o7BXa'></small><noframes id='o7BXa'>

                  1. <tfoot id='o7BXa'></tfoot><legend id='o7BXa'><style id='o7BXa'><dir id='o7BXa'><q id='o7BXa'></q></dir></style></legend>

                    • <bdo id='o7BXa'></bdo><ul id='o7BXa'></ul>
                  2. <i id='o7BXa'><tr id='o7BXa'><dt id='o7BXa'><q id='o7BXa'><span id='o7BXa'><b id='o7BXa'><form id='o7BXa'><ins id='o7BXa'></ins><ul id='o7BXa'></ul><sub id='o7BXa'></sub></form><legend id='o7BXa'></legend><bdo id='o7BXa'><pre id='o7BXa'><center id='o7BXa'></center></pre></bdo></b><th id='o7BXa'></th></span></q></dt></tr></i><div id='o7BXa'><tfoot id='o7BXa'></tfoot><dl id='o7BXa'><fieldset id='o7BXa'></fieldset></dl></div>