Re: [f2py] Location of vcvarsall.bat on Windows

Pearu Peterson <[email protected]>
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>

Paul Hobson wrote:
> Hey everyone,
> 
> I've followed f2py's example instructions to a T, and figure out this error:
> "error: Unable to find vcvarsall.bat" (more f2py output is below)

I was hit by this error too today. The error occurs with Python2.6
because it introduces a new module msvc9compiler.py that somehow
breaks detecting mingw compiler. In general (and out of topic),
the error may occur  when executing

  python setup.py build_ext --compiler=mingw32

As a workaround, one should use build command before build_ext:

  python setup.py build --compiler=mingw32

> I wrestled with this for several hours over the weekend. Went out got
> the contents of vcvarsall.bat, but now I just can't figure out what's
> calling it and where it should be.
> 
> -I've tried C:\Python26\scripts, several gfortran directories,
> C:\...\Visual Studio\vc, etc
> -I'm on Python 2.6 with a fresh intallation of Numpy and gfortan
> (started fresh on Friday)
> -calling f2py without any arguments confirms that it's installed correctly
> 
> Any thoughts? Any help is very much appreciated.
> -paul
> 
> -----f2py output-----
> 
> PHobson@por-phobson /cygdrive/c/python26/scripts
> $ python f2py.py -c mingw32 -m hello hello.f90

Try using
  python f2py.py -c --compiler=mingw32 -m hello hello.f90

Note that `-c` option has different meaning in f2py.py.

HTH,
Pearu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.