[Numpy-discussion] f2py usage

Pauli Virtanen pav@iki...
Fri Sep 12 13:21:46 CDT 2008


Fri, 12 Sep 2008 20:07:57 +0200, Nils Wagner wrote:
> How can I use f2py ?
> 
> I followed the instructions given at
> 
> http://www.scipy.org/F2py
> 
> To check if F2PY is installed correctly, I run
> 
> /usr/bin/f2py
> Traceback (most recent call last):
>    File "/usr/bin/f2py", line 20, in ?
>      from numpy.f2py import main
> ImportError: No module named numpy.f2py
> 
> Any pointer ?
> 
> nwagner@linux:~> /usr/bin/python
> Python 2.4 (#1, Oct 13 2006, 17:13:31) [GCC 3.3.5 20050117 (prerelease)
> (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license"
> for more information.
>>>> from numpy.f2py import main
>>>>
>>>>
> Nils

Do you have different versions of Python installed? Check that the first 
line of /usr/bin/f2py is something like 
#!/usr/bin/python

Or type f2py2.4 instead of f2py.

-- 
Pauli Virtanen



More information about the Numpy-discussion mailing list