[Numpy-discussion] error importing a f2py compiled module.

Fabrice Silva silva at lma.cnrs-mrs.fr
Mon Jun 23 08:10:58 EDT 2008


Le lundi 23 juin 2008 à 14:00 +0300, Pearu Peterson a écrit :
> First, it is not clear what compiler is f95. If it is gfortran, then
> use the command
>   f2py -m modulename -c --fcompiler=gnu95 tmpo.f
> 
> If it is something else, check the output of
> 
>   f2py -c --help-fcompiler
> 
> and use appropiate --fcompiler switch.
> 
> Second, I hope you realize that the first command has no effect to
> the second command. If you have edited the tmpo.pyf file, then use
> the following second command:
> 
>   f2py tmpo.pyf  -c --fcompiler=gnu95 tmpo.f

Thanks for these comments. The compiler was, following all the symbolic
links, gfortran so that I corrected the switch to gnu95.
The first line was the residue of some tests I've done in the past.
With the command line 
	f2py -c --quiet -m modulename --fcompiler=gnu95  fortranfile.f
it compiles as before, but I still can not import the module in python.

> I don't  have ideas what is causing this import error. Try
> the instructions above, may be it is due to some compile object
> conflicts.
The only posts on mailing lists I've read mention security policies
(SElinux) and /tmp execution limitations...
-- 
Fabrice Silva <silva at lma.cnrs-mrs.fr>
LMA UPR CNRS 7051 - équipe S2M




More information about the NumPy-Discussion mailing list