Python module magic.legendre not available when compiling f2py libraries
ygaillard opened this issue · 1 comments
ygaillard commented
I followed the steps from https://magic-sph.github.io/postProc.html#secpythonpostproc to enable python post-processing. However currently the fortran librairies cannot be successfully compiled.
What I did:
cd ~/magic/python/magic/
- installed required libs like scipy, matplotlib and numpy
cp $MAGIC_HOME/python/magic/magic.cfg.default $MAGIC_HOME/python/magic/magic.cfg
- set
buildLib = True
f2py magic.cfg
Output:
Reading fortran codes...
Reading file 'magic.cfg' (format:free)
Post-processing...
Applying post-processing hooks...
character_backward_compatibility_hook
Post-processing (stage 2)...
Building modules...
- Then start python. I'm using
python3.11
- Call magic libs
>>>from magic import *
Output:
Please wait: building greader_single...
Please wait: building greader_double...
Please wait: building lmrreader_single...
Please wait: building Legendre transforms...
Please wait: building vtklib...
Please wait: building cylavg...
python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ygaillard/magic/python/magic/__init__.py", line 17, in <module>
from .coeff import *
File "/home/ygaillard/magic/python/magic/coeff.py", line 9, in <module>
from .spectralTransforms import SpectralTransforms
File "/home/ygaillard/magic/python/magic/spectralTransforms.py", line 6, in <module>
import magic.legendre as leg
ModuleNotFoundError: No module named 'magic.legendre'
It seems that fortranLib/legendre.f90
is not compiled, hence cannot be called.
ygaillard commented
Need to fix matching f2py version. f2py3 is not compatible with python3.11. On Opensuse need to use Python3.6 since no f2py pre-compiled version found for 3.11