ipython --pylab prevents building the f2py libraries
tgastine opened this issue · 2 comments
Report from Vincent Boening: after installing MagIC from scratch, and starting python the first time with "ipython --pylab", the command "from magic import *" yields an error with the loading of Legendre transforms (after the compilation of the fortran stuff was done, also giving out "python" instead of "f2py"), which cannot be repaired. If one however, at the first time after installing, starts python with "ipython" (without "--pylab"), then everything works. At the second time, one can then also start python with the pylab option, and everything still works, just at the very first time, one has to not use the pylab option.
Unable to reproduce this with Ubuntu 20.04 LTS, python 3.8.10, ipython 8.12.2 with GNU compilers as well as on a cluster running CentOS 8.1.1911, python 3.10.4, ipython 8.4.0 with Intel compilers.
I have seen the above behavior usually happen when more than one version of python is present on the system and the libraries are built for one version while being called by another. Doesn't explain why the first call of ipython (without --pylab) works though.
This might be related: I have just learned that import magic
fails in python v3.12
, because numpy switched from distutils
to meson
. It all works fine on v3.11
.
An error is thrown when trying to figure out the fortran compiler with f2py
.
:~$ f2py -c --help-fcompiler
Cannot use distutils backend with Python 3.12, using meson backend instead.Using meson backend
Will pass --lower to f2py
See https://numpy.org/doc/stable/f2py/buildtools/meson.html
the command "from magic import *" yields an error with the loading of Legendre transforms (after the compilation of the fortran stuff was done, also giving out "python" instead of "f2py")
This was exactly the problem for me as well.