1
Yesterday, I upgraded my OS from ubuntu 16.04 to 18.04.
Since then, one of my python modules (on python 2.7) does not work anymore. Trying to import it yielded an error.
This module uses fortran code with f2py, so I tried using update-alternatives
to switch back to gcc-5 and gfotran-5 before making it again.
To some extent, this made the situation better, since python now accepts to import the module. However, it still does not work when I try to use it, throwing errors that begin with:
capi_return is NULL
Call-back "some_routine" failed.
Encouraged by this apparent progress, I want to see whether the remaining error is due to a mismatch between the compiler versions used to make the module and python itself. Indeed, python was compiled with gcc 7.3.
Is it possible to re-compile python 2.7 with gcc-5?
What I've tried: After switching to older compiler versions, I went in console mode and did:
sudo apt-get install --reinstall python
But python still says it was compiled with gcc 7.3.
Could something else have changed between the two OS versions that broke the module?
I want to emphasize that I did not write the module myself, and that it worked fine before the OS upgrade.
Thanks in advance for your suggestions :)
FYI,
apt
doesn't compile programs from source, it installs pre-compiled packages. – gronostaj – 2018-09-05T08:11:24.8271You would have to find the python source code and recompile "manually". But the problem is more likely a problem of python version or some runtime library. Why don't you update the module instead? – xenoid – 2018-09-05T08:20:32.387