Pip reports version conflict in wrong dependencies #12484
Labels
C: dependency resolution
About choosing which dependencies to install
C: error messages
Improving error messages
type: bug
A confirmed bug or unintended behavior
Description
I have a locally-developed package named
dandisets-healthstatus
. Its dependencies includepydantic ~= 2.0
and (in anall
extra)dandidav @ git+https://github.com/...
&dandi
(a PyPI package, without any version constraints).dandidav
depends ondandi >= 0.58.2
. The latest version ofdandi
on PyPI is 0.59.0.Unfortunately, what I failed to initially realize was that
dandi
currently requires Pydantic 1.x (with the upper-version bound enforced by a dependency ofdandi
). Thus, when I tried to installdandisets-healthstatus
withpip install .[all]
, pip correctly failed due to a version conflict, but the packages that it reported as conflicting actually weren't:If
dandiset-healthstatus
'sdandi
dependency is omitted from the list of requirements, then installation fails with a more accurate error message:Expected behavior
Pip should have reported that the Pydantic version requirements conflicted rather than the
dandi
version requirements.pip version
23.3.2
Python version
3.11.7
OS
macOS Sonoma 14.2.1
How to Reproduce
git clone https://github.com/dandi/dandisets-healthstatus.git
(I promise it won't bite)cd dandisets-healthstatus
git checkout ea4ebaa6
cd code
dandi
requirement insetup.cfg
to<= 0.60.0
.python3 -m venv venv
venv/bin/pip install .[all]
Output
A log of all output from
pip install -vvv
can be found at https://gist.github.com/jwodder/cd49394c1dfb2bb1e17a5aa32f5c4a49.Code of Conduct
The text was updated successfully, but these errors were encountered: