ES-DOC / esdoc-cdf2cim

Maps NetCDF files to CIM documents
Other
1 stars 7 forks source link

Dependency version compatibiliy issues #9

Open sashakames opened 4 years ago

sashakames commented 4 years ago

During the pip install, I get these warnings (called ERROR but the package install completes:

ERROR: cfunits 3.2.7 has requirement cftime>=1.1.3, but you'll have cftime 1.1.1 which is incompatible.
ERROR: cf-python 3.5.1 has requirement cfdm<1.9,>=1.8.5, but you'll have cfdm 1.8.3 which is incompatible.
ERROR: cf-python 3.5.1 has requirement cftime>=1.1.3, but you'll have cftime 1.1.1 which is incompatible.

We could probably work-around the requests issue. However, cdf2cim fails to import:

>>> import cdf2cim
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/export/ames4/.conda/envs/autocur/lib/python3.7/site-packages/cdf2cim/__init__.py", line 37, in <module>
    from cdf2cim.io_manager import dump as _dump
  File "/export/ames4/.conda/envs/autocur/lib/python3.7/site-packages/cdf2cim/io_manager.py", line 16, in <module>
    import cf
  File "/export/ames4/.conda/envs/autocur/lib/python3.7/site-packages/cf/__init__.py", line 155, in <module>
    import cfunits
  File "/export/ames4/.conda/envs/autocur/lib/python3.7/site-packages/cfunits/__init__.py", line 46, in <module>
    _minimum_vn, cftime.__version__, cftime.__file__))
ValueError: Bad cftime version: cfunits requires cftime>=1.1.3. Got 1.1.1 at /export/ames4/.conda/envs/autocur/lib/python3.7/site-packages/cftime/__init__.py

https://github.com/ES-DOC/esdoc-cdf2cim/pull/7/files addresses the requests issue.

davidhassell commented 4 years ago

Hi, there were issues with cftime 1.1.2 that caused cf-python and cfunits failures. These were fixed for 1.1.3, and cf-python and cfunits assume that these fixes are in place.

Is there a particular reason why cftime has to be 1.1.1 elsewhere?

The problem is that the cftime API changed after 1.1.1 (perhaps that's why you might want to keep 1.1.1?), I don't really want to support two cftime APIs in the cf-python and cfunits code bases. I will take a look to remind myself the extent of the problem, and if simple work-arounds are feasible.

(more later....)

David