3

In a package I'm maintaining, I have a requirements.txt containing an unpinned dependency pandas. Installing my package shows different behavior locally vs on Travis:

  • Running pip install on the package locally leads to installing Pandas version 0.24.2.
  • Running the same pip install within Travis CI leads to installing Pandas version 0.25.0rc0 (link to job).

In both cases the cases the versions of pip and setuptools are the same (pip==19.1.1, setuptools==41.0.1).

I'm not specifying an explicit index (and locally I don't have a global pip config), so I'm assuming both should use the standard PyPI index. Looking into the available versions on PyPi I can see that both 0.24.2 and 0.25.0rc0 are available.

How is it possible that I'm getting a different version locally compared to Travis? Does Travis have some kind of global pip config that would e.g. allow RC versions to be installed?

bluenote10
  • 23,414
  • 14
  • 122
  • 178

1 Answers1

1

Oops, an error in my Travis config happened to execute python setup.py install where I was expecting to see the output of pip install -e ..

Apparently, python setup.py install has a different logic to interpret unpinned dependencies in a requirements.txt and picks the RC version (see Q/A difference between python setup.py and pip install for general differences). I thought I can support both python setup.py install and pip install, but given the discrepancies in dependency resolution it's probably best to support pip only.

bluenote10
  • 23,414
  • 14
  • 122
  • 178