f2py on windows XP - "Unknown Switch"??

John Machin sjmachin at lexicon.net
Mon Aug 28 05:27:38 EDT 2006


On 28/08/2006 6:44 PM, Sile wrote:
> Cheers John -
> 
> I did finally getting f2py working on XP using MinGW, GnuFcompiler for
> F77, and much help!  However, having set up everything correctly I have
> been told in work I now need to use F90. I have downloaded and
> installed G95 MinGW in my MinGW directory and this isn't working now,
> I'm not having much joy with this! When I check the available fortran
> compilers in F2PY I get the following...............
> 
> customize Gnu95FCompiler
> 
> Could not locate executable f95
> 
> Executable f95 does not exist
> 
> Could not locate executable f95
> 
> Executable f95 does not exist
> 
> Could not locate executable f95
> 
> Executable f95 does not exist
> 
> customize IntelVisualFCompiler
> 
> Could not locate executable ifl
> 
> Executable ifl does not exist
> 
> customize G95FCompiler
> 
> Couldn't match compiler version for 'G95 (GCC 4.0.3 (g95 0.90!) Aug 22
> 2006) Copyright (C) 2002-2005 Free Software Foundation, Inc.nG95 comes
> with NO WARRANTY, to the extent permitted by law. You may redistribute
> copies of G95under the terms of the GNU General Public License.For more
> information about these
> 
> ...............etc.
> 
> 
> based on suggestions on the web I changed one line in g95.py to
> version_pattern =r'G95.*\(GCC4.01)\(g95!) (?P<version>.\).
> Unfortunately this didn't work for me. The problem seems to be with my
> gcc version so I'm trying to find a way around this at the moment. Any
> suggestions would be much appreciated, I have submitted this problem to
> the f2py mailing list too.
> 

Ummm shouldn't that be "GCC 4.0.1", not "GCC4.01" ???
Further that pattern seems as though it's been through some web 
garbling; for example "<" instead of "<", the parentheses don't 
match, the string isn't terminated by a "'", spaces missing, ....

Can you post an ungarbled version of the original line (maybe the 
*whole* g95.py -- e-mail if it's too big) and what you changed it to, 
plus what your f95 compiler puts out when you run it with  --version?

Cheers,
John



More information about the Python-list mailing list