pip-tools: pip-compile solving failure with tensorflow when solution exists

pip-compile fails to solve my requirements.in when a solution exists and pip install works.

(This seems quite similar to https://github.com/jazzband/pip-tools/issues/1420. I’m not sure if it’s the same underlying bug, so just filing a new issue.)

Environment Versions

  1. OS Type: docker image: amd64/python:3.8-buster
  2. Python version: 3.8.10
  3. pip version: 21.1.2
  4. pip-tools version: 6.2.0

Steps to replicate

$ docker run --rm -it --entrypoint bash amd64/python:3.8-buster
$ pip install -U pip wheel pip-tools
$ cat > requirements.in << EOF
tensorflow>=2.4.0
tensorflow-transform==0.29.0
EOF
$ pip-compile

Expected result

The following is a valid solution (not a full result, just listing the packages mentioned in the error message below):

tensorflow==2.4.2
tensorflow-serving-api==2.4.1
tensorflow-transform==0.29.0
tfx-bsl==0.29.0

Actual result

Could not find a version that matches tensorflow!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,<2.5,<3,>=1.15.2,>=2.4.0,>=2.5.0 (from -r requirements.in (line 1))
Tried: 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.4.2, 2.5.0
Skipped pre-versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3
There are incompatible versions in the resolved dependencies:
  tensorflow>=2.4.0 (from -r requirements.in (line 1))
  tensorflow!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,<2.5,>=1.15.2 (from tensorflow-transform==0.29.0->-r requirements.in (line 2))
  tensorflow!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,<3,>=1.15.2 (from tfx-bsl==0.29.0->tensorflow-transform==0.29.0->-r requirements.in (line 2))
  tensorflow<3,>=2.5.0 (from tensorflow-serving-api==2.5.1->tfx-bsl==0.29.0->tensorflow-transform==0.29.0->-r requirements.in (line 2))

Other notes

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (4 by maintainers)

Most upvoted comments

In case it’s helpful for others, I suggested an alternative approach to using pip-compile in this comment on a sister bug: https://github.com/jazzband/pip-tools/issues/1420#issuecomment-973146546