I am trying to import a fortran subroutine into python code. Following this guide https://notmatthancock.github.io/2017/02/10/calling-fortran-from-python.html I have added the following line into my fortran code:
!f2py intent(in) :: ear,ne,parames,ifl
!f2py intent(out) photar,photer
However when I try to use f2py -c fireball_ES_param.f -m fireball to create fireball.so to import in my python code I get several hundreds of warnings, which might be the problem but I am not sure: https://www.4shared.com/s/f2ynHZ_Wjda (it's too long to be posted here).
In any case, the fireball.cpython-34m.so file gets created, but when I try to import that from python I get:
$ python
Python 2.7.6 (default, Nov 13 2018, 12:45:42) [GCC 4.8.4] on
linux2 Type "help", "copyright", "credits" or "license" for more
information.
>>> import fireball Traceback (most recent call last):
File "<stdin>", line 1, in <module> ImportError:
No module named fireball
I tried:
import sys
sys.path.append('/path/to/folder/containing/fireball.cpython-34m.so')
but got the same result. I am not sure if there is a problem with the creation of fireball.so, or with its import.
.sofile located?sys.path.append('/path/to/folder/containing/fireball.cpython-34m.so'), but nothing changes