John Hunter jdhunter at
Mon Jul 19 21:43:13 CEST 2004

>>>>> "Noe" == Noe  <noe at> writes:

    Noe> thanks for your answer, but I already have a problem while
    Noe> launching the script :

    Noe> Fatal Python error: PyEval_RestoreThread: NULL tstate
    Noe> abnormal program termination

This kind of error is almost always caused by an incompatibility in
the GUI environment you are using and the backend you have chosen.
The default backend is set in the configuration file - see  See also and for general
information on this problem.

If you are running matplotlib from an IDE such as IDLE and you want to
use the tkagg backend (a typical configuration for win32 users), it is
recommended that you launch idle with -n.  Unfortunately, there was an
error in matplotlib/backends/ in the 'show' function
in the 0.60.2 release.  If this indeed is your configuration, try
editing this file and commenting out the line


in the show function and relaunching idle with -n.

The safest way to test/play/experiment with matplotlib is to launch
your script from the command shell, choosing the backend with the -d
flag, as in

  C:> python -dTkAgg

as described on  Once
you have matplotlib configured to your satisfaction from the shell,
you can refine your backend and IDE choice following the guidelines in
the links above.

Hope this helps,
John Hunter

More information about the Python-list mailing list