2

I try to use pip-compile to lock down my python dependency, so I wrote a very simple requirements.txt.

future >= 0.16.0
dronekit >= 2.9.1
dronekit-sitl >= 3.2.0
pymavlink >= 2.2.8
MAVProxy == 1.6.4
simplejson >= 3.10.0

However when I compile it, I got the following message:

$ pip-compile
Could not find a version that matches future==0.15.2,>=0.16.0
Tried: 0.0.1, 0.0.2, 0.0.3, 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.5.2, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.17.0, 0.17.1

What bothers me is that future-0.16.0 is clearly in the list of versions, and future==0.15.2 never exists in transitive dependencies of any other project! So why pip-compile is unable to get this contradicting information?

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
tribbloid
  • 4,026
  • 14
  • 64
  • 103
  • Depending on your use-case you may or may not find this helpful: I never use requirements.txt unless I'm writing a library for someone else. Containers/VMs/configuration managers have pretty much made it extraneous, at least for my uses (and maybe for yours). – Jared Smith Jan 29 '19 at 22:08
  • Related: [Pip needs a dependency resolver](https://github.com/pypa/pip/issues/988). – wim Jan 29 '19 at 22:17

1 Answers1

3

future==0.15.2 does exist in your transitive dependencies. The most recent dronekit release, v2.9.1, has the following line in its setup.py:

'future==0.15.2'

This has been changed to future>=0.15.2 in the current dronekit master, but not in any release.

user2357112
  • 260,549
  • 28
  • 431
  • 505
  • 1
    It does not matter that it is listed in `requirements.txt`. It matters that it is [*pinned* in `setup.py`](https://github.com/dronekit/dronekit-python/blob/v2.9.1/setup.py#L16). – wim Jan 29 '19 at 22:06
  • @wim: I don't quite remember how that interaction works out, but I think you're probably right. Edited. – user2357112 Jan 29 '19 at 22:12