[SciPy-user] Matlab can interfere with Python?
Andrew Straw
strawman at astraw.com
Wed Oct 15 23:22:15 EDT 2008
Hmm, the only thing I can think of is that MATLAB has hold of some
resources and therefore the OS won't let Python use them. Is there
anything like lsof or strace one can use on Windows? Even putting print
statements all over your Python process and seeing what statement is
blocking execution would be a start. I'm afraid my Windows knowledge is
pretty minimal, so I can't be of much help here.
-Andrew
Wes McKinney wrote:
> There's nothing wrong with the DLL build =) I was experiencing
> problems with unit-tested production code being ground to a halt when
> MATLAB is running in the background. In other words, I would execute a
> simple line of code in the Python shell and it would hang or take a
> very long time to execute. The instant MATLAB was closed (matlab not
> executing any code, just idling), Python stopped hanging and code
> would run as usual. (Seriously!)
>
> I listed the gcc linkage since I thought Matlab might be interfering
> somehow with the use of the Microsoft C runtime, but that doesn't make
> that much sense either because Matlab has it's own C runtime DLL.
>
> Thanks,
> Wes
>
> On Wed, Oct 15, 2008 at 4:49 PM, Andrew Straw <strawman at astraw.com
> <mailto:strawman at astraw.com>> wrote:
>
> Just to be clear, it seems like you have experienced problems with
> 2 things:
>
> 1) While doing the link step to create a .dll (well, .pyd file) when
> running MinGW's GCC on a .c file, the linking fails due to an error.
> (The .c file being autogenerated by Cython when compiling a .pyx
> file.)
> If this is correct, what do you mean by "prevent Python from
> linking" --
> Python is not executing in this case. What is the exact gcc error
> message? Does gcc not find the python25.dll? Does gcc fail to link
> other
> files that have nothing to do with python (i.e. they don't use symbols
> from python25.dll)?
>
> 2) "severly inhibit execution of code" -- are the symptoms any
> different
> than the CPU being busy or the RAM being full? Have you checked those
> things?
>
> Still just trying to understand the nature of the problem,
> Andrew
>
> Wes McKinney wrote:
> > I have experienced this bizarre problem on two my coworker's machine
> > who run Matlab (7.6.0 rev 2008a) and I have been teaching to use
> > Python/Numpy/Scipy. Occasionally Matlab will somehow prevent Python
> > from linking with various DLLs or severely inhibit the execution of
> > code. I am not really sure how this could be (other than the Borg at
> > the MathWorks not wanting anyone to use open source software),
> but has
> > anyone else experienced this? As soon as I killed Matlab the problem
> > disappeared.
> >
> > Here is the linkage output from a Cython dll that was killed by
> this:
> >
> > C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s
> > build\temp.win32-2.5\Release\tseries.o
> > build\temp.win32-2.5\Release\tseries.def -LC:\Python25\libs -LC:\P
> > ython25\PCBuild -lpython25 -lmsvcr71 -o tseries.pyd
> >
> > Maybe it's locking up the windows C runtime msvcr71?
> >
> > Any help here would be appreciated.
> >
> > Thanks,
> > Wes
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > SciPy-user mailing list
> > SciPy-user at scipy.org <mailto:SciPy-user at scipy.org>
> > http://projects.scipy.org/mailman/listinfo/scipy-user
> >
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org <mailto:SciPy-user at scipy.org>
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
More information about the SciPy-User
mailing list