Closed manuel-koch closed 9 months ago
Could you please try to run pip install -r /project/requirements.in --dry-run
?
Running plain pip install on a fresh python environment:
$ pip install -r requirements.in --dry-run
results in more-or-less the same strange error
Obtaining my-lib-a from git+ssh://****@bitbucket.org/my-lib-a.git@v4.1.1#egg=my-lib-a (from -r requirements.in (line 35))
Cloning ssh://****@bitbucket.org/my-lib-a.git (to revision v4.1.1) to /python/src/my-lib-a
Running command git clone --filter=blob:none --quiet 'ssh://****@bitbucket.org/my-lib-a.git' /python/src/my-lib-a
warning: filtering not recognized by server, ignoring
warning: filtering not recognized by server, ignoring
Running command git checkout -q 011d2303542909412da0e88a03dc3ddf9e5b9f3d
Resolved ssh://****@bitbucket.org/my-lib-a.git to commit 011d2303542909412da0e88a03dc3ddf9e5b9f3d
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Obtaining my-lib-b from git+ssh://****@bitbucket.org/my-lib-b.git@My_Branch#egg=my-lib-b (from -r requirements.in (line 36))
Cloning ssh://****@bitbucket.org/my-lib-b.git (to revision My_Branch) to /python/src/my-lib-b
Running command git clone --filter=blob:none --quiet 'ssh://****@bitbucket.org/my-lib-b.git' /python/src/my-lib-b
warning: filtering not recognized by server, ignoring
warning: filtering not recognized by server, ignoring
Running command git checkout -b My_Branch --track origin/My_Branch
Switched to a new branch 'My_Branch'
branch 'My_Branch' set up to track 'origin/My_Branch'.
Resolved ssh://****@bitbucket.org/my-lib-b.git to commit 100972e7b82a77989558a171b7ebf272d3b9932b
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
....
<A LOT OF OTHER DEPENDENCIES>
....
Collecting my-lib-a@ git+ssh://git@bitbucket.org/my-lib-a.git@v4.1.1 (from my-lib-b->-r requirements.in (line 36))
Cloning ssh://****@bitbucket.org/my-lib-a.git (to revision v4.1.1) to /private/var/folders/4l/pq2frs651d1ccv5rtxxmwjww0000gn/T/pip-install-yv5vm01q/my-lib-a_c49dcd3e766147d19847ac0547687e67
Running command git clone --filter=blob:none --quiet 'ssh://****@bitbucket.org/my-lib-a.git' /private/var/folders/4l/pq2frs651d1ccv5rtxxmwjww0000gn/T/pip-install-yv5vm01q/my-lib-a_c49dcd3e766147d19847ac0547687e67
warning: filtering not recognized by server, ignoring
warning: filtering not recognized by server, ignoring
Running command git checkout -q 011d2303542909412da0e88a03dc3ddf9e5b9f3d
Resolved ssh://****@bitbucket.org/my-lib-a.git to commit 011d2303542909412da0e88a03dc3ddf9e5b9f3d
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting nptyping<3,>=2 (from my-lib-b->-r requirements.in (line 36))
Using cached nptyping-2.5.0-py3-none-any.whl (37 kB)
INFO: pip is looking at multiple versions of my-lib-b to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.in (line 36) and my-lib-a 4.1.1 (from git+ssh://****@bitbucket.org/my-lib-a.git@v4.1.1#egg=my-lib-a) because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested my-lib-a 4.1.1 (from git+ssh://****@bitbucket.org/my-lib-a.git@v4.1.1#egg=my-lib-a)
my-lib-b 0.0.2.dev1+g100972e depends on my-lib-a 4.1.1 (from git+ssh://****@bitbucket.org/my-lib-a.git@v4.1.1)
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/topics/dependency-resolution/#dealing-with-dependency-conflicts
Is pip
maybe confused because of the two slightly different URLs: w/ or w/o the "egg" postfix ?
@manuel-koch, thank you! This error originates from pip, so you might consider raising this issue in their tracker. I would also recommend searching through their tracker; you may find some related issues. Nonetheless, thanks for the report!
Follow up from the child ticket I've created for pip.
As mentioned here my issue could be solved by not using the "-e" pip-option in my requirements.in
but instead use
the "normal" way of referring package via VCS URL:
....
my-lib-a @ git+ssh://git@bitbucket.org/my-lib-a.git@v4.1.1
my-lib-b @ git+ssh://git@bitbucket.org/my-lib-b.git@My_Branch
....
I supposed this can be closed now.
Environment Versions
$ python -V
: Python 3.10.6$ pip --version
: pip 23.2.1 from /python/site-packages/pip (python 3.10)$ pip-compile --version
: pip-compile, version 7.3.0Preface
The dependencies as modeled in my program and the depending libs are as follows
i.e.
pyproject.toml
ofmy-lib-b
looks likei.e.
requirements.in
of my program looks likeError when running
pip-compile
Running pip-compile
yields the following error
I would expect that requiring the same git commit ( and hence library version is the same ) in a program and a nested dependency is Ok.
Is this a general problem, i.e. it is not supported to have direct references of the same package in a program and a nested dependency ? Is this a bug in pip-compile ?
Full console output looks like