Can't compare time index to a time instance
#### Code Sample, a copy-pastable example if possible

```python
Python 3.7.3 (default, May  8 2019, 05:28:42) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
>>> import datetime
>>> df = pd.DataFrame([[datetime.time(1, 1, 0), 1]], columns=['time', 'num'])
>>> df.set_index('time', inplace=True)
>>> df.index > datetime.time(1, 1, 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 84, in cmp_method
    result = op(self.values, np.asarray(other))
TypeError: '>' not supported between instances of 'int' and 'datetime.time'
>>> pd.__version__
'0.24.2'

```

The above code works on my local MacOS but doesn't inside a container `FROM python:3.7.3`. Same python version, same pandas version.

But locally, python is from the miniconda.

What could be the reason please?