External consoles don't work after numpy-scipy-matplotlib update

46 views
Skip to first unread message

Benoit Bovy

unread,
Sep 30, 2010, 10:18:43 AM9/30/10
to spyder
Hello,

I've just updated numpy (to 1.5.0), scipy (to 0.8.0) and matplotlib
(to 1.0.0) from package repositories of opensuse 11.2.

Everything worked fine before the updates but now I can't open any
external console in spyder (run a script, open a new python or ipython
interpreter...). The new console tap opens and then the process
(thread) immediately stops (console status is "terminé").

I have this issue with both spyder 1.1.3 and 2.0.0beta3. I've tried
running spyder in debug mode and alse removed all starting options for
ipython, but the problem is still there and no error is mentioned
during debugging.

Any idea ?

Thanks,

Benoit.

Pierre Raybaut

unread,
Oct 2, 2010, 5:45:42 AM10/2/10
to spyder
Hi,

In Spyder v2.0:
* Could you please open the internal console in case there is some
tracebacks there?
* When running a simple script (like a "hello world!" program), could
you edit the run configuration and add "-v" to Python interpreter
command line options? -> this should display a lot of debug text and
hopefully an error message. (you may have to change console's buffer
depth which is only 300 lines by default -- Preferences > Console >
Buffer ("tampon"))

Thanks,
Pierre

Marcos

unread,
Oct 3, 2010, 3:10:12 AM10/3/10
to spyder
I an new to Spyder and just installed Spyder 2.0.0beta4 and the latest
versions of its dependencies for Python2.7 win32.

I got the same behavior (if I understood correctly) but after I
selected the option 'Interact with the Python interpreter after
execution' at the 'Run configurations' dialog in the Run/Configure...
menu (or just press F6), the plot window does not disappear anymore.

The Internal console also works fine for importing pyplab and
plotting.

However, for the IPython interpreter the plots also don't work for me.
An empty window appears (with no axes) and as soon as I interact with
this window I get the same error as pointed by the later email
'interaction when using matplotlib': 'Fatal Python error:
PyEval_RestoreThread: NULL tstate'.

HTH

Marcos

David Verelst

unread,
Oct 3, 2010, 8:07:15 AM10/3/10
to spyd...@googlegroups.com
Does it help to change the matplotlib backend?

After importing matplotlib but before pylab:
matplotlib.use('Qt4Agg', warn=True)

> --
> You received this message because you are subscribed to the Google Groups "spyder" group.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
>
>

Marcos Duarte

unread,
Oct 3, 2010, 11:51:16 AM10/3/10
to spyderlib
As this problem only happens with the IPython interpreter, which
already sets the backends at startup, where do I change this?
In the preferences/Console/External modules/ option the only thing I
could do is to remove the -pylab option but doesn't work.

thanks

Marcos

Marcos Duarte

unread,
Oct 3, 2010, 12:05:00 PM10/3/10
to spyderlib
Yes, it solves the problem.

I set the backend Qt4Agg at the matplotlibrc file
(http://matplotlib.sourceforge.net/users/customizing.html#customizing-matplotlib).

thank you

Marcos

On Sun, Oct 3, 2010 at 09:07, David Verelst <david....@gmail.com> wrote:

josef...@gmail.com

unread,
Oct 3, 2010, 12:08:39 PM10/3/10
to spyd...@googlegroups.com
On Sun, Oct 3, 2010 at 11:51 AM, Marcos Duarte <mdua...@gmail.com> wrote:
> As this problem only happens with the IPython interpreter, which
> already sets the backends at startup, where do I change this?
> In the preferences/Console/External modules/ option the only thing I
> could do is to remove the -pylab option but doesn't work.

Changing the backend works for me if I include this in the run scriptfile
import matplotlib
matplotlib.use('Qt4Agg')#, warn=True)

(I don't know why warn worked in the regular spyder shell but raised a
TypeError in the ipython shell)

but this is with numpy 1.4 and matplotlib 0.99.1, where I also had
backend problems

Josef

Benoit Bovy

unread,
Oct 4, 2010, 4:11:13 AM10/4/10
to spyder
I tried to run a simple script in a new console with the "-v" option,
and I got a lot of tracebacks !
Unfortunately, Spyder quits with a bus error before I'm able to read
or copy/paste the messages (I set the buffer depth to 100 000
lines !). I don't know how I can get it (Is there a file where
tracebacks are recorded ?)
I just had the time to see some "scipy" stuff in the long messages...

From a terminal, I can run simple scripts and also scripts where
scipy, numpy, matplotlib, pylab... are imported.

Thanks,
Benoît.

Benoit Bovy

unread,
Oct 4, 2010, 6:19:23 AM10/4/10
to spyder
More details about the tracebacks :
I think I saw something related to "scipy.io" submodule (but I'm not
sure)
I remember I had to change some part of my python scripts where I used
some functions of scipy.io that are now removed in scipy 0.8
(fread...). I don't know if there is a link with the issue here.

I removed the scipy 0.8.0-12.1 package and now the external consoles
(ipython and python) work properly. But without scipy...

Benoit Bovy

unread,
Oct 4, 2010, 11:54:57 AM10/4/10
to spyder
Here am i again :-) !

Just to say that i commented the code in load_matlab function
(spyderlib/utils/iofuncs.py).
Now the external consoles start properly, with scipy (but without
load_matlab, but i don't use it :-) )
The solution is there...

Benoît.

Pierre Raybaut

unread,
Oct 9, 2010, 5:14:50 AM10/9/10
to spyder
Could you try to import the 'load_matlab' function to help me
understand what's wrong with it?

Just open a Python interpreter outside Spyder and enter the following:
from spyderlib.utils.iofuncs import load_matlab

Have you tried to simply import scipy.io (again, outside Spyder)?

Thanks,
Pierre
Reply all
Reply to author
Forward
0 new messages