[Numpy-discussion] f2py and pygtk on windows
Sun Mar 11 13:56:59 CDT 2012
On 3/10/2012 9:31 PM, Sameer Grover wrote:
> On 10 March 2012 02:23, Christoph Gohlke<firstname.lastname@example.org> wrote:
>> On 3/9/2012 11:50 AM, Sameer Grover wrote:
>>>>>> import gtk
>>>>>> import foo # where foo is any f2py-wrapped program
>>> Subsequently, on exiting python interpreter, the interpreter crashes
>>> with this error message - "This application has requested the Runtime
>>> to terminate it in an unusual way. Please contact the application's
>>> support team for more information."
>>> Strangely enough, interchanging the order of the import statements,
>>> i.e. importing the f2py wrapped program before gtk works fine.
>>> Furthermore, each module works fine individually.
>>> This is a windows-only problem. I'm using Windows 7, Python 2.7,
>>> latest numpy, mingw32 compiler and the "pygtk all-in-one installer"
>>> (mentioned on the pygtk download page).
>>> This happens even for very simpl fortran programs such as this one -
>>> subroutine hello ()
>>> write(*,*)'Hello from Fortran90!!!'
>>> end subroutine hello
>>> I don't know whether the problem is with f2py or with gtk or with
>>> python but maybe somebody can shed some light on this.
>>> Sameer Grover
>> The error can be due to memory corruption. It works for me with
>> msvc9/ifort builds of the pygtk and f2py extensions.
>> Which DLLs does foo.pyd depend on (use DependencyWalker)?
>> NumPy-Discussion mailing list
> The .pyd file generated by f2py depends on the following
> It is possible that this is a mingw32 problem. I haven't been able to
> try using ifort/msvc.(mscv is somehow not getting installed on my
> system, but that's a separate issue).
Can you try linking to the msvc9 runtime DLL? E.g.
f2py.py -c --fcompiler=gnu95 --compiler=mingw32 -lmsvcr90 -m foo foo.f
More information about the NumPy-Discussion