Pip: 点20.2.4进入了无限的依赖关系解析

创建于 2020-10-19  ·  40评论  ·  资料来源: pypa/pip

你好,

尝试安装项目的依赖项进行测试时,我的CI进入无限分辨率状态:

pip install -e .[test] --use-feature=2020-resolver -i https://artifactory.company.com/api/pypi/pypi/simple

输出量

Looking in indexes: https://artifactory.company.com/api/pypi/pypi/simple
Collecting deprecation
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/02/c3/253a89ee03fc9b9682f1541728eb66db7db22148cd94f89ab22528cd1e1b/deprecation-2.1.0-py2.py3-none-any.whl (11 kB)
Collecting six
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting toolz
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/12/f5/537e55f8ba664ff2a26f26913010fb0fcb98b6bbadc6158af888184fd0b7/toolz-0.11.1-py3-none-any.whl (55 kB)
Collecting packaging
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/46/19/c5ab91b1b05cfe63cccd5cfc971db9214c6dd6ced54e33c30d5af1d2bc43/packaging-20.4-py2.py3-none-any.whl (37 kB)
Collecting pyparsing>=2.0.2
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Installing collected packages: six, pyparsing, packaging, toolz, deprecation
Successfully installed deprecation-2.1.0 packaging-20.4 pyparsing-2.4.7 six-1.15.0 toolz-0.11.1
[32;1m$ pip install git+https://${CI_REGISTRY_USER}:${CI_JOB_TOKEN}@gitlab.company.com/proj/pygraph.git<strong i="11">@Dev_Py3</strong> ${PIP_OPTS}[0;m
Looking in indexes: https://artifactory.company.com/api/pypi/pypi/simple
Collecting git+https://gitlab-ci-token:****@gitlab.company.com/proj/pygraph.git<strong i="12">@Dev_Py3</strong>
  Cloning https://gitlab-ci-token:****@gitlab.company.com/proj/pygraph.git (to revision Dev_Py3) to /tmp/pip-req-build-eulnmcb2
Collecting networkx==2.*
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/9b/cd/dc52755d30ba41c60243235460961fc28022e5b6731f16c268667625baea/networkx-2.5-py3-none-any.whl (1.6 MB)
Collecting redis
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/a7/7c/24fb0511df653cf1a5d938d8f5d19802a88cef255706fdda242ff97e91b7/redis-3.5.3-py2.py3-none-any.whl (72 kB)
Collecting decorator>=4.3.0
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/ed/1b/72a1821152d07cf1d8b6fce298aeb06a7eb90f4d6d41acec9861e7cc6df0/decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Building wheels for collected packages: graph-pygraph
  Building wheel for graph-pygraph (setup.py): started
  Building wheel for graph-pygraph (setup.py): finished with status 'done'
  Created wheel for graph-pygraph: filename=graph_pygraph-0.0.202010091542+devpy3-py3-none-any.whl size=71373 sha256=610fe21400ba7adec344b8345b819d42244631d11227a24bfb0fe068c959c309
  Stored in directory: /tmp/pip-ephem-wheel-cache-ovmjos36/wheels/7e/80/09/96d325dfa75fe4d16a6345d433dc8d944ebe48f4a049a12633
Successfully built graph-pygraph
Installing collected packages: decorator, redis, networkx, graph-pygraph
Successfully installed decorator-4.4.2 graph-pygraph-0.0.202010091542+devpy3 networkx-2.5 redis-3.5.3
[32;1m$ pip install git+https://${CI_REGISTRY_USER}:${CI_JOB_TOKEN}@gitlab.company.com/proj/parser.git<strong i="13">@Dev_Py3</strong> ${PIP_OPTS}[0;m
Looking in indexes: https://artifactory.company.com/api/pypi/pypi/simple
Collecting git+https://gitlab-ci-token:****@gitlab.company.com/proj/parser.git<strong i="14">@Dev_Py3</strong>
  Cloning https://gitlab-ci-token:****@gitlab.company.com/proj/parser.git (to revision Dev_Py3) to /tmp/pip-req-build-h_satb7q
Requirement already satisfied: deprecation in ./.venv/lib/python3.6/site-packages (from graph-parser==0.0.202009100923+devpy3) (2.1.0)
Requirement already satisfied: six in ./.venv/lib/python3.6/site-packages (from graph-parser==0.0.202009100923+devpy3) (1.15.0)
Collecting defusedxml
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/06/74/9b387472866358ebc08732de3da6dc48e44b0aacd2ddaa5cb85ab7e986a2/defusedxml-0.6.0-py2.py3-none-any.whl (23 kB)
Requirement already satisfied: packaging in ./.venv/lib/python3.6/site-packages (from deprecation->graph-parser==0.0.202009100923+devpy3) (20.4)
Requirement already satisfied: six in ./.venv/lib/python3.6/site-packages (from graph-parser==0.0.202009100923+devpy3) (1.15.0)
Requirement already satisfied: pyparsing>=2.0.2 in ./.venv/lib/python3.6/site-packages (from packaging->deprecation->graph-parser==0.0.202009100923+devpy3) (2.4.7)
Building wheels for collected packages: graph-parser
  Building wheel for graph-parser (setup.py): started
  Building wheel for graph-parser (setup.py): finished with status 'done'
  Created wheel for graph-parser: filename=graph_parser-0.0.202009100923+devpy3-py3-none-any.whl size=20698 sha256=f2d7b651180d9f844b7aafe8b9431938ceecbfec798407c47b7258b94528c75c
  Stored in directory: /tmp/pip-ephem-wheel-cache-bmna_g2x/wheels/fb/eb/f2/38806b77dcb72c250f63911a3567922b604ab6e88ab74ff980
Successfully built graph-parser
Installing collected packages: defusedxml, graph-parser
Successfully installed defusedxml-0.6.0 graph-parser-0.0.202009100923+devpy3
[32;1m$ pip install git+https://${CI_REGISTRY_USER}:${CI_JOB_TOKEN}@gitlab.company.com/proj/interfaces.git<strong i="15">@Dev_Py3</strong> --no-deps ${PIP_OPTS}[0;m
Looking in indexes: https://artifactory.company.com/api/pypi/pypi/simple
Collecting git+https://gitlab-ci-token:****@gitlab.company.com/proj/interfaces.git<strong i="16">@Dev_Py3</strong>
  Cloning https://gitlab-ci-token:****@gitlab.company.com/proj/interfaces.git (to revision Dev_Py3) to /tmp/pip-req-build-20dgw2sv
Building wheels for collected packages: graph-interfaces
  Building wheel for graph-interfaces (setup.py): started
  Building wheel for graph-interfaces (setup.py): finished with status 'done'
  Created wheel for graph-interfaces: filename=graph_interfaces-0.0.202009180922+devpy3-py3-none-any.whl size=36309 sha256=4a461620d4810f49bd1072a202ab767d56a171bcaa6c5609dcdbaadcc7c4f0a9
  Stored in directory: /tmp/pip-ephem-wheel-cache-5fdbdk3o/wheels/03/ab/79/5bc1653cb185c54b17d12b2b8d495e5231cf117605d3073d9e
Successfully built graph-interfaces
Installing collected packages: graph-interfaces
Successfully installed graph-interfaces-0.0.202009180922+devpy3
[32;1m$ pip install git+https://${CI_REGISTRY_USER}:${CI_JOB_TOKEN}@gitlab.company.com/proj/post-binding.git<strong i="17">@Dev_Py3</strong> --no-deps ${PIP_OPTS}[0;m
Looking in indexes: https://artifactory.company.com/api/pypi/pypi/simple
Collecting git+https://gitlab-ci-token:****@gitlab.company.com/proj/post-binding.git<strong i="18">@Dev_Py3</strong>
  Cloning https://gitlab-ci-token:****@gitlab.company.com/proj/post-binding.git (to revision Dev_Py3) to /tmp/pip-req-build-94mbisdx
Building wheels for collected packages: graph-post-bindings
  Building wheel for graph-post-bindings (setup.py): started
  Building wheel for graph-post-bindings (setup.py): finished with status 'done'
  Created wheel for graph-post-bindings: filename=graph_post_bindings-Dev-py3-none-any.whl size=211749 sha256=efbf8dfa72e4e461740a19a1208952d712fdcace52f17379fd7ad18d9da3b912
  Stored in directory: /tmp/pip-ephem-wheel-cache-vwr6n_g0/wheels/43/7e/ef/8849b821244fee59fc5b97c8694cf87e5609633ea26d65f8a0
Successfully built graph-post-bindings
Installing collected packages: graph-post-bindings
Successfully installed graph-post-bindings-Dev
[32;1m$ pip install -e .[test] ${PIP_OPTS}[0;m
Looking in indexes: https://artifactory.company.com/api/pypi/pypi/simple
Obtaining file:///tmp/proj/scenarios
Requirement already satisfied: graph-pygraph<1 in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.0.202010091542+devpy3)
Requirement already satisfied: graph-interfaces<1 in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.0.202009180922+devpy3)
Requirement already satisfied: graph-parser<1 in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.0.202009100923+devpy3)
Requirement already satisfied: graph-post_bindings==Dev in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (Dev)
Requirement already satisfied: toolz in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.11.1)
Requirement already satisfied: graph-pygraph<1 in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.0.202010091542+devpy3)
Requirement already satisfied: graph-interfaces<1 in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.0.202009180922+devpy3)
Requirement already satisfied: graph-parser<1 in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.0.202009100923+devpy3)
Requirement already satisfied: graph-post_bindings==Dev in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (Dev)
Requirement already satisfied: toolz in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.11.1)
Collecting cerberus
  Downloading https://artifactory.company.com/api/pypi/pypi/packages/packages/90/a7/71c6ed2d46a81065e68c007ac63378b96fa54c7bb614d653c68232f9c50c/Cerberus-1.3.2.tar.gz (52 kB)
Requirement already satisfied: setuptools in ./.venv/lib/python3.6/site-packages (from cerberus->graph-scenarios==0.0.202010191027+unknown) (50.3.2)
Requirement already satisfied: redis in ./.venv/lib/python3.6/site-packages (from graph-pygraph<1->graph-scenarios==0.0.202010191027+unknown) (3.5.3)
Requirement already satisfied: networkx==2.* in ./.venv/lib/python3.6/site-packages (from graph-pygraph<1->graph-scenarios==0.0.202010191027+unknown) (2.5)
Requirement already satisfied: graph-parser<1 in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.0.202009100923+devpy3)
Requirement already satisfied: graph-pygraph<1 in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.0.202010091542+devpy3)
Requirement already satisfied: redis in ./.venv/lib/python3.6/site-packages (from graph-pygraph<1->graph-scenarios==0.0.202010191027+unknown) (3.5.3)
Requirement already satisfied: deprecation in ./.venv/lib/python3.6/site-packages (from graph-parser<1->graph-scenarios==0.0.202010191027+unknown) (2.1.0)
Requirement already satisfied: six in ./.venv/lib/python3.6/site-packages (from graph-parser<1->graph-scenarios==0.0.202010191027+unknown) (1.15.0)
Requirement already satisfied: defusedxml in ./.venv/lib/python3.6/site-packages (from graph-parser<1->graph-scenarios==0.0.202010191027+unknown) (0.6.0)
Requirement already satisfied: toolz in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.11.1)
Collecting graph-parser<1
  Downloading https://artifactory.company.com/api/pypi/pypi/graph-parser/0.0.202009100923%2Bunknown/graph_parser-0.0.202009100923%2Bunknown-py3-none-any.whl (20 kB)
Requirement already satisfied: deprecation in ./.venv/lib/python3.6/site-packages (from graph-parser<1->graph-scenarios==0.0.202010191027+unknown) (2.1.0)
Requirement already satisfied: six in ./.venv/lib/python3.6/site-packages (from graph-parser<1->graph-scenarios==0.0.202010191027+unknown) (1.15.0)
Requirement already satisfied: defusedxml in ./.venv/lib/python3.6/site-packages (from graph-parser<1->graph-scenarios==0.0.202010191027+unknown) (0.6.0)
Requirement already satisfied: toolz in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.11.1)

我得到的最后4行将永远重复:

Requirement already satisfied: deprecation in ./.venv/lib/python3.6/site-packages (from graph-parser<1->graph-scenarios==0.0.202010191027+unknown) (2.1.0)
Requirement already satisfied: six in ./.venv/lib/python3.6/site-packages (from graph-parser<1->graph-scenarios==0.0.202010191027+unknown) (1.15.0)
Requirement already satisfied: defusedxml in ./.venv/lib/python3.6/site-packages (from graph-parser<1->graph-scenarios==0.0.202010191027+unknown) (0.6.0)
Requirement already satisfied: toolz in ./.venv/lib/python3.6/site-packages (from graph-scenarios==0.0.202010191027+unknown) (0.11.1)

附加信息

在上面的输出中, PIP_OPTS设置为--use-feature=2020-resolver -i https://artifactory.company.com/api/pypi/pypi/simple

我们使用的公司托管索引与pip==20.2.3没有任何问题。

!release blocker new resolver bug

最有用的评论

谢谢! 我设法将有问题的要求限制为

pytest-mock>=1.11.0
pytest-sugar>=0.9.3
pytest-testmon<1.0.0
coverage==5.3

删除其中任何一个和解析器将能够产生解决方案。 我将尝试构建一个测试用例并从那里开始工作(希望能在一周之内)。


注意(对我自己):我当前的假设是,如果解析程序看到多个不相关的冲突,则可以触发此问题。 它会看到一个,为此回溯,看到另一个,为此回溯,然后再次击中第一个。

所有40条评论

嗨! 感谢您提交此问题! 您能否分享pip尝试安装的要求? 这将在相关项目的setup.py/pyproject.toml中。

“公共”依赖项是:

    install_requires=[
        'cerberus',
        '<inhouse component 1>',
        '<inhouse component 2>',
        '<inhouse component 3>',
        '<inhouse component 4>',
        '<inhouse component 5>',
        'pint',
        '<inhouse component 6>',
        '<inhouse component 7>',
        'toolz',
        'pyyaml>=5.1',
    ],
    extras_require={'test': ['pylint', 'pytest>=4', 'pytest-cov', 'pytest-html', 'pytest-xdist',]},

但是,如您所见,我们还需要多个内部库。

这里有一个pip list的是什么版本的20.2.3它可以帮助安装的情况下:

$ pip list
Package              Version                  Location
-------------------- ------------------------ ------------------
amqp                 5.0.1
apipkg               1.5
asteval              0.9.19
astroid              2.4.2
attrs                20.2.0
<inhouse>
billiard             3.6.3.0
celery               5.0.1
Cerberus             1.3.2
certifi              2020.6.20
chardet              3.0.4
click                7.1.2
click-didyoumean     0.0.3
click-repl           0.1.6
coverage             5.3
cycler               0.10.0
decorator            4.4.2
defusedxml           0.6.0
deprecation          2.1.0
execnet              1.7.1
future               0.18.2
<inhouse>
<inhouse>
<inhouse>
<inhouse>
<inhouse>
h5py                 2.10.0
importlib-metadata   2.0.0
importlib-resources  3.0.0
iniconfig            1.1.1
isort                5.6.4
kiwisolver           1.2.0
kombu                5.0.2
lazy-object-proxy    1.4.3
<inhouse>
lmfit                1.0.1
matplotlib           3.3.2
mccabe               0.6.1
munch                2.5.0
networkx             2.5
numpy                1.19.2
packaging            20.4
pandas               1.1.3
Pillow               8.0.0
Pint                 0.16.1
pip                  20.2.3
pluggy               0.13.1
<inhouse>
<inhouse>
prompt-toolkit       3.0.8
py                   1.9.0
<inhouse>
<inhouse>
<inhouse>
pylint               2.6.0
pyparsing            2.4.7
<inhouse>
pytest               6.1.1
pytest-cov           2.10.1
pytest-forked        1.3.0
pytest-html          2.1.1
pytest-metadata      1.10.0
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the '/tmp/ues/scenarios/.venv/bin/python -m pip install --upgrade pip' command.
pytest-xdist         2.1.0
python-dateutil      2.8.1
pytz                 2020.1
PyYAML               5.3.1
redis                3.5.3
scipy                1.5.3
setuptools           50.3.2
six                  1.15.0
tabulate             0.8.7
toml                 0.10.1
toolz                0.11.1
typed-ast            1.4.1
uncertainties        3.1.4
vine                 5.0.0
wcwidth              0.2.5
wheel                0.35.1
wrapt                1.12.1
xlwt                 1.3.0
zipp                 3.3.1

不知道它是否最终会有用,但是我应该_pre-pip install_ deprecation six toolz ,这实际上是我要做的:

pip install deprecation six toolz ${PIP_OPTS}
# some more pip installation using the new resolver
pip install -e .[test] ${PIP_OPTS}

感谢您的分享。 但是,此信息仍然不足以重现此问题。 :(

我基本上需要在解析过程中pip看到的(package-name, version): [dependencies]的整个映射才能进行调试,而我显然无法查找内部包的依赖关系。 ;)

因此,有两个相关的问题:

  • 您能否为此创建一个最小的复制器,以便我们可以尝试此操作而无需访问内部软件包? :)

    • 如果没有,是否有可能为我在解析过程中查看pip的软件包提供类似于我上面提到的映射的内容?

  • 即使以.而不是.[test] (即不进行额外测试),也会发生此错误吗?

我基本上需要重新创建/查看解析器的内部状态,当它卡住时,出于多种原因,我们不会在任何地方打印/记录解析器。

好的,我一直在尝试在本地重现该问题,但没有成功。

我试图在另一个分支的CI中重现此内容,但它同样没有失败。

所以我回到了今天早些时候有问题的原始分支,并切换回20.2.4 ,这次它成功解决了依赖性...

这可能是缓存问题吗?

我们的CI与k8s赛跑者合作,所以我怀疑情况是否如此。

如果再次发生,我应该关闭它并重新打开吗?

这可能是缓存问题吗?

pip在依赖关系解析期间不缓存任何内容-仅网络I / O。 我不认为是那样。

如果再次发生,我应该关闭它并重新打开吗?

当然! 这对我行得通。 如果您能够提出一个复制器,那就太好了!

嘿,我也看到了类似的问题,这是一天前突然开始的。

在pip 20.2.4上,我可以用

pip install --use-feature=2020-resolver "google-api-core>1.18.0,<1.21.0" "google-cloud-monitoring>=2.0.0"

该行为似乎不确定,但是每次它都会开始下载依赖项的许多版本(可能是_every_版本!),并陷入Requirement already satisfied循环中,或者看起来好像完全冻结了。 这是一个很烂的例子,但是我们的CI版本在被杀死之前被卡住了6个小时。

请注意,我尝试安装的两个库实际上导致版本冲突,如果我删除--use-feature=2020-resolver ,则会收到一条正常错误消息:

google-cloud-monitoring 2.0.0 requires google-api-core[grpc]<2.0.0dev,>=1.22.2, but you'll have google-api-core 1.20.1 which is incompatible.

同样,如果我下降到pip 20.2.3(并使用2020-resolver ),我也会很快得到依赖冲突错误。

如果我将以上要求更改为google-cloud-monitoring<2.0.0那么无论有没有2020-resolver ,它都可以正常工作

希望这可以帮助

我也碰到了这一点-我针对一个现有的(相当大的) requirements.txt文件运行了新的解析器,最终运行到Requirement already satisfied的无限循环中。

这是我复制的步骤: https :

较短的版本:我针对此文件运行了pip install --use-feature=2020-resolver -r requirements.txthttps

在没有--use-feature=标志的情况下运行该命令可以给我以下信息:

ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

pocket-to-sqlite 0.2 requires sqlite-utils~=2.4.4, but you'll have sqlite-utils 2.22 which is incompatible.
healthkit-to-sqlite 0.5 requires sqlite-utils~=2.4.4, but you'll have sqlite-utils 2.22 which is incompatible.

尽管奇怪的是,无限循环问题没有提到这些软件包-看起来像这样:

Collecting twitter-to-sqlite~=0.20
  Using cached twitter_to_sqlite-0.20-py3-none-any.whl (25 kB)
Requirement already satisfied: click~=7.1.1 in /Users/simon/.local/share/virtualenvs/pipnext-HNJm0oR8/lib/python3.8/site-packages (from datasette>=0.50.2->-r requirements.txt (line 2)) (7.1.2)
Requirement already satisfied: click~=7.1.1 in /Users/simon/.local/share/virtualenvs/pipnext-HNJm0oR8/lib/python3.8/site-packages (from datasette>=0.50.2->-r requirements.txt (line 2)) (7.1.2)
...

我通过将所有~=需求切换为>=需求来解决问题。

因此,我认为这里存在一个错误,但它是一个用户界面错误:无限循环要求似乎已由警告中显示的依赖项冲突触发,但错误本身(某些情况下Requirement already satisfied无限循环不相关的软件包)确实令人困惑。

本周一次会议的每次对话中, @ pradyunsg需要进一步调查-也会欢迎其他人的帮助( @pfmoore@uranusjr ,以防您有时间提供帮助)。

@pradyunsg,您可以在星期二戳一下吗?

我不太可能在短期内拥有带宽,但是如果有空闲时间,我可能会看看。

使用当前的master分支,所有复制器基本上都立即失效。 我已经在Ubuntu VM上的干净virtualenv中运行它们,并且pip的master分支以可编辑模式安装,带有setuptools 41.2.0。

@DanSimonhttps://github.com/pypa/pip/issues/9011#issuecomment -712280236:

$ pip install --use-feature=2020-resolver "google-api-core>1.18.0,<1.21.0" "google-cloud-monitoring>=2.0.0"
Collecting google-cloud-monitoring>=2.0.0
  Using cached google_cloud_monitoring-2.0.0-py2.py3-none-any.whl (287 kB)
Collecting google-api-core<1.21.0,>1.18.0
  Using cached google_api_core-1.20.1-py2.py3-none-any.whl (90 kB)
Requirement already satisfied: setuptools>=34.0.0 in ./pythonenv3.8/lib/python3.8/site-packages (from google-api-core<1.21.0,>1.18.0) (41.2.0)
Collecting google-api-core[grpc]<2.0.0dev,>=1.22.2
  Using cached google_api_core-1.23.0-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.4-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.3-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.2-py2.py3-none-any.whl (91 kB)
Collecting google-api-core<1.21.0,>1.18.0
  Downloading google_api_core-1.19.1-py2.py3-none-any.whl (90 kB)
     |████████████████████████████████| 90 kB 4.4 MB/s 
Requirement already satisfied: setuptools>=34.0.0 in ./pythonenv3.8/lib/python3.8/site-packages (from google-api-core<1.21.0,>1.18.0) (41.2.0)
  Downloading google_api_core-1.19.0-py2.py3-none-any.whl (90 kB)
     |████████████████████████████████| 90 kB 4.7 MB/s 
Requirement already satisfied: setuptools>=34.0.0 in ./pythonenv3.8/lib/python3.8/site-packages (from google-api-core<1.21.0,>1.18.0) (41.2.0)
  Downloading google_api_core-1.20.0-py2.py3-none-any.whl (90 kB)
     |████████████████████████████████| 90 kB 5.9 MB/s 
Requirement already satisfied: setuptools>=34.0.0 in ./pythonenv3.8/lib/python3.8/site-packages (from google-api-core<1.21.0,>1.18.0) (41.2.0)
ERROR: Cannot install google-api-core<1.21.0 and >1.18.0, google-api-core[grpc] 1.23.0, google-api-core<1.21.0 and >1.18.0, google-api-core[grpc] 1.22.4, google-api-core<1.21.0 and >1.18.0, google-api-core[grpc] 1.22.3, google-api-core<1.21.0 and >1.18.0 and google-api-core[grpc] 1.22.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested google-api-core<1.21.0 and >1.18.0
    google-api-core[grpc] 1.23.0 depends on google-api-core 1.23.0 (from https://files.pythonhosted.org/packages/2e/3d/d7af13040ab5b259994a4434ff03d68084a994e709bc8afa4bee1235310e/google_api_core-1.23.0-py2.py3-none-any.whl#sha256=94d8c707d358d8d9e8b0045c42be20efb58433d308bd92cf748511c7825569c8 (from https://pypi.org/simple/google-api-core/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*))
    The user requested google-api-core<1.21.0 and >1.18.0
    google-api-core[grpc] 1.22.4 depends on google-api-core 1.22.4 (from https://files.pythonhosted.org/packages/9f/52/e7720d652aeb7d514d3a2e62d263c8058f465beee2fc41260591c0fecc3a/google_api_core-1.22.4-py2.py3-none-any.whl#sha256=15e00ceb7e6dc44159e2a41a222830744e9ebcb3a553c580b61cb5a66572f2f0 (from https://pypi.org/simple/google-api-core/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*))
    The user requested google-api-core<1.21.0 and >1.18.0
    google-api-core[grpc] 1.22.3 depends on google-api-core 1.22.3 (from https://files.pythonhosted.org/packages/eb/b0/ea7b8a2c136095c5be2f14210b31b214cb74c1eb8fee09a01ad0423a2a95/google_api_core-1.22.3-py2.py3-none-any.whl#sha256=6a95bfcf6f661ec0dffd96013b47100765f4f88ce54412562176bfcb11a997c1 (from https://pypi.org/simple/google-api-core/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*))
    The user requested google-api-core<1.21.0 and >1.18.0
    google-api-core[grpc] 1.22.2 depends on google-api-core 1.22.2 (from https://files.pythonhosted.org/packages/3c/45/a5707ce2cbd6681c09e69a0ce10d9bebe98e0231c458a4dc652670f3584f/google_api_core-1.22.2-py2.py3-none-any.whl#sha256=67e33a852dcca7cb7eff49abc35c8cc2c0bb8ab11397dc8306d911505cae2990 (from https://pypi.org/simple/google-api-core/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*))

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

@simonwhttps://github.com/pypa/pip/issues/9011#issuecomment -714025122:

$ pip install --use-feature=2020-resolver -r requirements.txt
Collecting https://github.com/simonw/goodreads-to-sqlite/archive/f3d5cd1692e8b5f830416512c6778079e500917a.zip (from -r requirements.txt (line 38))
  Downloading https://github.com/simonw/goodreads-to-sqlite/archive/f3d5cd1692e8b5f830416512c6778079e500917a.zip
     | 364 kB 16.8 MB/s
Collecting datasette>=0.50.2
  Downloading datasette-0.50.2-py3-none-any.whl (205 kB)
     |████████████████████████████████| 205 kB 10.8 MB/s 
Collecting datasette-haversine
  Downloading datasette_haversine-0.1-py3-none-any.whl (6.5 kB)
Collecting datasette-render-markdown>=1.1.2
  Downloading datasette_render_markdown-1.1.2-py3-none-any.whl (8.7 kB)
Collecting datasette-show-errors
  Downloading datasette_show_errors-0.2-py3-none-any.whl (6.3 kB)
Collecting datasette-write
  Downloading datasette_write-0.1-py3-none-any.whl (3.6 kB)
Collecting datasette-init
  Downloading datasette_init-0.2-py3-none-any.whl (2.9 kB)
Collecting dogsheep-beta>=0.9
  Downloading dogsheep_beta-0.9-py3-none-any.whl (10 kB)
Collecting yaml-to-sqlite~=0.3
  Downloading yaml_to_sqlite-0.3-py3-none-any.whl (7.5 kB)
Collecting healthkit-to-sqlite~=0.5
  Downloading healthkit_to_sqlite-0.5-py3-none-any.whl (9.3 kB)
ERROR: Cannot install sqlite-utils>=2.17, -r requirements.txt (line 25), -r requirements.txt (line 28), -r requirements.txt (line 38), -r requirements.txt (line 39) and -r requirements.txt (line 40) because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested sqlite-utils>=2.17
    datasette-init 0.2 depends on sqlite-utils
    dogsheep-beta 0.9 depends on sqlite-utils
    goodreads-to-sqlite 0.4 depends on sqlite-utils>=2.9
    yaml-to-sqlite 0.3 depends on sqlite-utils
    healthkit-to-sqlite 0.5 depends on sqlite-utils~=2.4.4

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

我尝试使用最新的master分支,但没有发现任何区别,当我尝试运行最初发布的命令时,pip仍然挂起。 也许我没有做正确的事,但是我在标准的python:3.7 docker镜像中以及在macOS的本地虚拟环境中都尝试了此操作:

$ docker run --entrypoint=bash -it python:3.7
...
root<strong i="7">@24eb69007fc3</strong>:/# git clone https://github.com/pypa/pip.git
Cloning into 'pip'...
...

root<strong i="8">@24eb69007fc3</strong>:/# cd pip/
root<strong i="9">@24eb69007fc3</strong>:/pip# pip install -e .
...
Successfully installed pip

root<strong i="10">@24eb69007fc3</strong>:/pip# git branch -v
* master 00e531a16 Merge pull request #9017 from pradyunsg/backtracking-messaging

root<strong i="11">@24eb69007fc3</strong>:/pip# pip list
Package    Version   Location
---------- --------- --------
pip        20.3.dev0 /pip/src
setuptools 50.3.2
wheel      0.35.1

root<strong i="12">@24eb69007fc3</strong>:/pip# pip install --use-feature=2020-resolver "google-api-core>1.18.0,<1.21.0" "google-cloud-monitoring>=2.0.0"
Collecting google-api-core<1.21.0,>1.18.0
  Using cached google_api_core-1.20.1-py2.py3-none-any.whl (90 kB)
Requirement already satisfied: setuptools>=34.0.0 in /usr/local/lib/python3.7/site-packages (from google-api-core<1.21.0,>1.18.0) (50.3.2)
Collecting google-cloud-monitoring>=2.0.0
  Using cached google_cloud_monitoring-2.0.0-py2.py3-none-any.whl (287 kB)
Collecting pytz
  Using cached pytz-2020.1-py2.py3-none-any.whl (510 kB)
Collecting googleapis-common-protos<2.0dev,>=1.6.0
  Using cached googleapis_common_protos-1.52.0-py2.py3-none-any.whl (100 kB)
Collecting requests<3.0.0dev,>=2.18.0
  Using cached requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting protobuf>=3.12.0
  Using cached protobuf-3.13.0-cp37-cp37m-manylinux1_x86_64.whl (1.3 MB)
Requirement already satisfied: setuptools>=34.0.0 in /usr/local/lib/python3.7/site-packages (from google-api-core<1.21.0,>1.18.0) (50.3.2)
Collecting six>=1.10.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting google-auth<2.0dev,>=1.14.0
  Using cached google_auth-1.22.1-py2.py3-none-any.whl (114 kB)
Requirement already satisfied: setuptools>=34.0.0 in /usr/local/lib/python3.7/site-packages (from google-api-core<1.21.0,>1.18.0) (50.3.2)
Collecting proto-plus>=1.4.0
  Using cached proto-plus-1.11.0.tar.gz (44 kB)
Collecting libcst>=0.2.5
  Using cached libcst-0.3.13-py3-none-any.whl (502 kB)
Collecting google-api-core[grpc]<2.0.0dev,>=1.22.2
  Using cached google_api_core-1.23.0-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.4-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.3-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.2-py2.py3-none-any.whl (91 kB)
INFO: pip is looking at multiple versions of this package to determine which version is compatible with other requirements. This could take a while.
Collecting libcst>=0.2.5
  Using cached libcst-0.3.12-py3-none-any.whl (501 kB)
  Using cached libcst-0.3.11-py3-none-any.whl (501 kB)
  Using cached libcst-0.3.10-py3-none-any.whl (498 kB)
  Using cached libcst-0.3.9-py3-none-any.whl (496 kB)
  Using cached libcst-0.3.8-py3-none-any.whl (488 kB)
  Using cached libcst-0.3.7-py3-none-any.whl (487 kB)
  Using cached libcst-0.3.6-py3-none-any.whl (481 kB)
INFO: pip is looking at multiple versions of this package to determine which version is compatible with other requirements. This could take a while.
  Using cached libcst-0.3.5-py3-none-any.whl (479 kB)
  Using cached libcst-0.3.4-py3-none-any.whl (476 kB)
  Using cached libcst-0.3.3-py3-none-any.whl (465 kB)
  Using cached libcst-0.3.2-py3-none-any.whl (460 kB)
  Using cached libcst-0.3.1-py3-none-any.whl (445 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime.If you want to abort this run, you can press Ctrl + C to do so.To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Using cached libcst-0.3.0-py3-none-any.whl (433 kB)
  Using cached libcst-0.2.7-py3-none-any.whl (431 kB)
  Using cached libcst-0.2.6-py3-none-any.whl (430 kB)
  Using cached libcst-0.2.5-py3-none-any.whl (368 kB)
INFO: pip is looking at multiple versions of this package to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of this package to determine which version is compatible with other requirements. This could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime.If you want to abort this run, you can press Ctrl + C to do so.To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking

然后卡住。 我让它静置约30分钟,然后再取消。

同样,这似乎不仅仅限于20.2.4。 我可以使用以下命令(与我上面发布的命令稍有不同)在其他版本的20.2(每个发行版中具有2020-resolver标志)中引起相同的无限循环问题:

pip install --use-feature=2020-resolver "apache-beam[gcp]==2.25.0" google-api-core==1.20.1

谢谢@DanSimon! 我可以使用apache-beam[gcp]示例(带有一个较小的补丁程序来改善解析程序的操作记录)来重现该示例:

$ pip install --use-feature=2020-resolver "apache-beam[gcp]==2.25.0" google-api-core==1.20.1
Collecting apache-beam[gcp]==2.25.0
  Using cached apache_beam-2.25.0-cp38-cp38-manylinux2010_x86_64.whl (10.3 MB)
Collecting google-api-core==1.20.1
  Using cached google_api_core-1.20.1-py2.py3-none-any.whl (90 kB)
Requirement already satisfied: setuptools>=34.0.0 in ./pythonenv3.8/lib/python3.8/site-packages (from google-api-core==1.20.1) (41.2.0)
Collecting numpy<2,>=1.14.3
  Using cached numpy-1.19.2-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
Collecting future<1.0.0,>=0.18.2
  Using cached future-0.18.2.tar.gz (829 kB)
Collecting pymongo<4.0.0,>=3.8.0
  Using cached pymongo-3.11.0-cp38-cp38-manylinux2014_x86_64.whl (530 kB)
Collecting protobuf<4,>=3.12.2
  Using cached protobuf-3.13.0-cp38-cp38-manylinux1_x86_64.whl (1.3 MB)
Requirement already satisfied: setuptools>=34.0.0 in ./pythonenv3.8/lib/python3.8/site-packages (from google-api-core==1.20.1) (41.2.0)
Collecting pydot<2,>=1.2.0
  Using cached pydot-1.4.1-py2.py3-none-any.whl (19 kB)
Collecting python-dateutil<3,>=2.8.0
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting typing-extensions<3.8.0,>=3.7.0
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting pyarrow<0.18.0,>=0.15.1
  Using cached pyarrow-0.17.1-cp38-cp38-manylinux2014_x86_64.whl (63.8 MB)
Collecting httplib2<0.18.0,>=0.8
  Using cached httplib2-0.17.4-py3-none-any.whl (95 kB)
Collecting crcmod<2.0,>=1.7
  Using cached crcmod-1.7.tar.gz (89 kB)
Collecting mock<3.0.0,>=1.0.1
  Using cached mock-2.0.0-py2.py3-none-any.whl (56 kB)
Collecting hdfs<3.0.0,>=2.1.0
  Using cached hdfs-2.5.8.tar.gz (41 kB)
Collecting requests<3.0.0,>=2.24.0
  Using cached requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting grpcio<2,>=1.29.0
  Using cached grpcio-1.33.2-cp38-cp38-manylinux2014_x86_64.whl (3.8 MB)
Collecting avro-python3!=1.9.2,<1.10.0,>=1.8.1
  Using cached avro-python3-1.9.2.1.tar.gz (37 kB)
Collecting dill<0.3.2,>=0.3.1.1
  Using cached dill-0.3.1.1.tar.gz (151 kB)
Collecting fastavro<2,>=0.21.4
  Using cached fastavro-1.0.0.post1-cp38-cp38-manylinux2014_x86_64.whl (1.7 MB)
Collecting pytz>=2018.3
  Using cached pytz-2020.1-py2.py3-none-any.whl (510 kB)
Collecting oauth2client<5,>=2.0.1
  Using cached oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
Collecting google-cloud-build<3,>=2.0.0
  Using cached google_cloud_build-2.0.0-py2.py3-none-any.whl (67 kB)
Collecting google-auth<2,>=1.18.0
  Using cached google_auth-1.22.1-py2.py3-none-any.whl (114 kB)
Requirement already satisfied: setuptools>=34.0.0 in ./pythonenv3.8/lib/python3.8/site-packages (from google-api-core==1.20.1) (41.2.0)
Collecting google-apitools<0.5.32,>=0.5.31
  Using cached google-apitools-0.5.31.tar.gz (173 kB)
Collecting google-cloud-spanner<2,>=1.13.0
  Using cached google_cloud_spanner-1.19.1-py2.py3-none-any.whl (255 kB)
Collecting google-cloud-dlp<2,>=0.12.0
  Using cached google_cloud_dlp-1.0.0-py2.py3-none-any.whl (169 kB)
Collecting grpcio-gcp<1,>=0.2.2
  Using cached grpcio_gcp-0.2.2-py2.py3-none-any.whl (9.4 kB)
Collecting google-cloud-language<2,>=1.3.0
  Using cached google_cloud_language-1.3.0-py2.py3-none-any.whl (83 kB)
Collecting google-cloud-core<2,>=0.28.1
  Using cached google_cloud_core-1.4.3-py2.py3-none-any.whl (27 kB)
Collecting google-cloud-videointelligence<2,>=1.8.0
  Using cached google_cloud_videointelligence-1.16.0-py2.py3-none-any.whl (183 kB)
Collecting google-cloud-datastore<2,>=1.7.1
  Using cached google_cloud_datastore-1.15.3-py2.py3-none-any.whl (134 kB)
Collecting cachetools<5,>=3.1.0
  Using cached cachetools-4.1.1-py3-none-any.whl (10 kB)
Collecting google-cloud-pubsub<2,>=0.39.0
  Using cached google_cloud_pubsub-1.7.0-py2.py3-none-any.whl (144 kB)
Collecting google-cloud-bigquery<2,>=1.6.0
  Using cached google_cloud_bigquery-1.28.0-py2.py3-none-any.whl (187 kB)
  Using cached google_cloud_bigquery-1.27.2-py2.py3-none-any.whl (172 kB)
  Using cached google_cloud_bigquery-1.26.1-py2.py3-none-any.whl (170 kB)
  Using cached google_cloud_bigquery-1.26.0-py2.py3-none-any.whl (170 kB)
  Using cached google_cloud_bigquery-1.25.0-py2.py3-none-any.whl (169 kB)
Collecting google-cloud-vision<2,>=0.38.0
  Using cached google_cloud_vision-1.0.0-py2.py3-none-any.whl (435 kB)
Collecting google-cloud-bigtable<2,>=0.31.1
  Using cached google_cloud_bigtable-1.5.1-py2.py3-none-any.whl (266 kB)
Collecting six>=1.10.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting googleapis-common-protos<2.0dev,>=1.6.0
  Using cached googleapis_common_protos-1.52.0-py2.py3-none-any.whl (100 kB)
Collecting pyparsing>=2.1.4
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting pbr>=0.11
  Using cached pbr-5.5.1-py2.py3-none-any.whl (106 kB)
Collecting docopt
  Using cached docopt-0.6.2.tar.gz (25 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
Collecting chardet<4,>=3.0.2
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Using cached urllib3-1.25.11-py2.py3-none-any.whl (127 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting pyasn1-modules>=0.0.5
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting rsa>=3.1.4
  Using cached rsa-4.6-py3-none-any.whl (47 kB)
Collecting pyasn1>=0.1.7
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting google-api-core[grpc]<2.0.0dev,>=1.22.0
  Using cached google_api_core-1.23.0-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.4-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.3-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.2-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.1-py2.py3-none-any.whl (91 kB)
  Using cached google_api_core-1.22.0-py2.py3-none-any.whl (91 kB)
Backtracking pyasn1 0.4.8 LinkCandidate
INFO: pip is looking at multiple versions of this package to determine which version is compatible with other requirements. This could take a while.
Collecting pyasn1>=0.1.7
  Downloading pyasn1-0.4.7-py2.py3-none-any.whl (76 kB)
     |████████████████████████████████| 76 kB 2.7 MB/s 
Backtracking pyasn1 0.4.7 LinkCandidate
  Downloading pyasn1-0.4.6-py2.py3-none-any.whl (75 kB)
     |████████████████████████████████| 75 kB 2.5 MB/s 
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
INFO: pip is looking at multiple versions of this package to determine which version is compatible with other requirements. This could take a while.
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
INFO: pip is looking at multiple versions of this package to determine which version is compatible with other requirements. This could take a while.
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime.If you want to abort this run, you can press Ctrl + C to do so.To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
INFO: pip is looking at multiple versions of this package to determine which version is compatible with other requirements. This could take a while.
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime.If you want to abort this run, you can press Ctrl + C to do so.To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate
Backtracking pyasn1 0.4.7 LinkCandidate
Backtracking pyasn1 0.4.6 LinkCandidate
Backtracking rsa 4.6 LinkCandidate

我想我已经找到了问题所在。 在sarugaku / resolvelib#60中提交的修复程序,在该修复程序中我还描述了对该问题的理解。

@uranusjr我想我可以通过内部方式重现此问题。

我该如何测试您的公关? 我不确定resolvelib集成到pip ...

@romaingz我正在制作PR,以引入更改以供人们测试。

我已将一个修补好的点子插入我的叉子。 你可以用

python -m pip install -U https://github.com/uranusjr/pip/archive/resolvelib-dev.zip

我可以从上面的apache-beam[gcp] + google-api-core示例生成此错误消息:

ERROR: Cannot install apache-beam, apache-beam, apache-beam, apache-beam, apache-beam, apache-beam,
apache-beam, apache-beam, apache-beam, apache-beam, apache-beam, apache-beam, google-api-core==1.20.1,
google-api-core==1.20.1, google-api-core==1.20.1, google-api-core==1.20.1, google-api-core==1.20.1,
google-api-core==1.20.1, google-api-core[grpc] 1.22.0, google-api-core[grpc] 1.22.1,
google-api-core[grpc] 1.22.2, google-api-core[grpc] 1.22.3, google-api-core[grpc] 1.22.4 and
google-api-core[grpc] 1.23.0 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

(有关改进消息的讨论,请参见#8495,让我们暂时将其保留。)

但是,我发现错误消息不一致,因为解析器尝试需求的顺序不是确定性的。 如果添加确定性排序(并删除此修复程序),我将无法生成无限分辨率resolution

因此,昨天整天失败的内容今天不再失败(没有@uranusjr的补丁程序)。

我可以从失败的尝试中获取种子,然后在其他尝试中重用以保持一致的结果吗?

我可以从失败的尝试中获取种子,然后在其他尝试中重用以保持一致的结果吗?

我不这么认为-这很可能取决于Python所做的哈希随机化(因为排序顺序逻辑使用相同的键提供了多个项目,并且在#9100中已解决)。

今天,这个问题让我对cheroot项目感到困扰。 我签出了cherrypy / cheroot @ 5de9b053 ,设置了PIP_USE_FEATURE=2020-resolver ,然后运行了tox ,它似乎挂起了。 我取消了它,进行了清理,然后以tox -vvv重新启动,我可以看到有关安装pytest和coverage的消息(其中包括)。 清除功能标志并按预期运行测试。 tox安装的pip版本是20.2.3(尽管可以使用20.2.4)。 我还没有机会进一步调查。

https://github.com/cherrypy/cheroot/tree/pypa-9011中,我提交了两个提交,一个提交复制了问题,另一个提交了建议的修复程序。 似乎在应用建议的修复程序之后,该代码不再挂起,但现在检测到冲突。 这向我表明该修复程序确实可以解决该问题。

嗯也许我讲得太早了。 我注意到该分支的某些构建快速失败(〜90s),但其他构建继续运行(〜20m)。 在我的本地工作站上,某些运行挂起,而其他运行完成。

您可能还受到不确定性问题的影响(已在#9100中修复)。 您是否可以尝试与master一起重现挂起问题(我认为应该始终成功还是失败)?

确认在pip master下运行会导致测试可靠地挂起

谢谢! 我设法将有问题的要求限制为

pytest-mock>=1.11.0
pytest-sugar>=0.9.3
pytest-testmon<1.0.0
coverage==5.3

删除其中任何一个和解析器将能够产生解决方案。 我将尝试构建一个测试用例并从那里开始工作(希望能在一周之内)。


注意(对我自己):我当前的假设是,如果解析程序看到多个不相关的冲突,则可以触发此问题。 它会看到一个,为此回溯,看到另一个,为此回溯,然后再次击中第一个。

值得一提的是,我认为此错误可能与其他功能有关,并提及需求中的预发布版本。 在这种情况下,当我在一个包和一个包插件之间无休止地循环时,发生了这种情况。 我可以通过避免预发布来解决此问题,建议也这样做,但我担心在过去的三个月中我至少遇到3次此错误,而在我的花园中只有一次。

这里的人们可能对此更新感兴趣。

现在,这是发布pip 20.3的两个主要障碍之一,仅供公众阅读。

更新:对此进行了修复。 pip 20.3(应该包含修复程序)可能很快就会发生,但是我已经更新了fork(在此评论中提到)以包含它。 随时尝试并报告它是否确实解决了该问题!

这个“ resolvelib-dev”提议的补丁解决了我自己的无限分辨率情况https://github.com/pypa/pip/issues/9112#issuecomment -735222069

我遇到一个无限循环,试图在Mac上将以下requirements.txtpip==20.3到一个新的venv,python版本3.8.5中:

tensorboard==2.2.2
torch==1.7.0
tqdm>=4.54

nltk==3.5.0
transformers==3.5.0
tokenizers==0.9.4
jsonlines>=1.2
sacrebleu>=1.4

pytest>=6.1
pytest-cov>=2.10
codecov>=2.1
flake8>=3.8
black==20.8b1

安装最终陷入循环,并重复以下输出:

Requirement already satisfied: typing-extensions>=3.7.4 in ./testenv/lib/python3.8/site-packages (from black==20.8b1->-r requirements.txt (line 15)) (3.7.4.3)
Requirement already satisfied: regex>=2020.1.8 in ./testenv/lib/python3.8/site-packages (from black==20.8b1->-r requirements.txt (line 15)) (2020.11.13)
Requirement already satisfied: setuptools>=41.0.0 in ./testenv/lib/python3.8/site-packages (from tensorboard==2.2.2->-r requirements.txt (line 1)) (44.0.0)

启用--use-feature=2020-resolver 20.2.4输出:

ERROR: Cannot install tokenizers==0.9.4 and transformers 3.5.0 because these package versions have conflicting dependencies.

..但安装确实会终止。

编辑:通过要求transformers==4.0.0安装冲突来解决冲突。

重新打开。

也碰到这个。

这是使用pip 20.3为我复制的需求文件
pip --version pip 20.3 from /home/elijah/venvs/pipresolve/lib64/python3.8/site-packages/pip (python 3.8)

boto
boto3
botocore
cryptography
elasticsearch
gcloud
google-api-python-client
junit-xml
junit2html
junitparser
kubernetes>=8.0.0,<9.0.0
openshift==0.8.9

使用20.2.4时,安装确实有错误:
openshift 0.8.9 requires urllib3<1.25, but you'll have urllib3 1.26.2 which is incompatible.但安装完成

@tomhosking的案子最终给了我

ERROR: Cannot install -r r.txt (line 6) and tokenizers==0.9.4 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested tokenizers==0.9.4
    transformers 3.5.0 depends on tokenizers==0.9.3

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

我还没有完成第二个任务,但是希望它也会导致最终的输出判断错误。

在这两种情况下,输出似乎都停滞了,因为它们一遍又一遍地重复显示相同的程序包。 但是当仔细检查时,解析器会偶尔吐出不同的东西,表明进度。

@tomhosking的示例:

  Downloading codecov-2.1.5-py2.py3-none-any.whl (16 kB)
(a ton of setuptools and wheel lines)
  Downloading codecov-2.1.4-py2.py3-none-any.whl (16 kB)
(a ton of setuptools and wheel lines)
  Downloading codecov-2.1.3.tar.gz (18 kB)
(goes on and on)

@kdelee的示例:

  Using cached junit-xml-1.8.tar.gz (10.0 kB)
(a ton of setuptools lines)
  Using cached junit-xml-1.7.tar.gz (9.1 kB)
(a ton of setuptools lines)
  Downloading junit-xml-1.6.tar.gz (9.1 kB)
(...)

因此,我认为解析器中没有逻辑错误,只是pip的输出不能很好地表达它在尝试(非常轻微地)尝试不同的事情。

@kdelee的示例:
因此,我认为解析器中没有逻辑错误,只是pip的输出不能很好地表达它在尝试(非常轻微地)尝试不同的事情。

这是可以相信的,因此尽管这可能不是“无限”递归的情况,但它仍在有限地尝试,超出了我的等待范围(目前有一项工作在pip安装中循环运行了3个多小时。)并没有真正告诉我怎么了。 听起来像https://github.com/pypa/pip/issues/9185是个好主意

感谢您检查@uranusjr! 有点像@kdelee ,我发现这是因为CI工作流程超时。 一种更快或更失败的输出失败的方式会很棒:)

此时提交的报告与最初的报告(以及它作为20.3的发布阻止程序跟踪的报告)不同。

我将关闭此代码以支持#9187,因为我想在单独的问题中保留20.2.4与20.3的报告。

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