spectraphilic/reflexible

ImportError: dynamic module does not define init function (PyInit_FortFlex)

jdavid opened this issue · 3 comments

Trying to build reflexible, I get this error:

$ python -c 'import reflexible'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "[...]/reflexible/__init__.py", line 106, in <module>
    from . import conv2netcdf4
  File "[...]/reflexible/conv2netcdf4/__init__.py", line 5, in <module>
    from .grid_read import read_grid, get_slabs, fill_grids
  File "[...]/reflexible/conv2netcdf4/grid_read.py", line 12, in <module>
    from .FortFlex import sumgrid
ImportError: dynamic module does not define init function (PyInit_FortFlex)

Any clue?

Uh, it would probably be helpful to see the logs of your build, but (I am guessing here) probably the FortFlex module failed to build because you don/t have the gfortran compiler installed. Could you install it and retry? If it keep not working, please send your build logs.

It worked with miniconda.
It failed when I tried with virtualenv, though gfortran is installed.
Should have gone for miniconda first. Probably not worth investigating further.
Maybe it should be stated in the docs to use conda.

Well, in theory Anaconda/Miniconda should not be needed, but provided that it has become a standard de facto for scientific computing, it would not hurt to strongly suggest that in the README.