Fatal Python error when importing pyplot

I am using Mac OS X 10.5.5 and have installed Enthought’s latest Python distribution which includes Matplotlib 0.98.3. I get a fatal python error whenever I try to import matplotlib.pyplot. The exact message I get is:

Fatal Python error: Interpreter not initialized (version mismatch?)

Abort trap

Has anyone else had a problem with this? Please help me because I can’t do any plotting until it’s fixed!

Thanks,

Jeremy

So you haven’t installed matplotlib or wxpython separately? This error can arise when the version of python that built the extension is not the same as the version of python you are running. I suggest making sure you have a clean install of enthought python (remove the install dir entirely), reinstall it, and if you still see the same problem report it on the enthought list because it looks like a build problem more than a matplotlib problem.

Before you report, you may want to do some extra diagnostics. Eg create a script like

import matplotlib
matplotlib.use(‘Agg’)
import matplotlib.pyplot

and try running this script, replacing ‘Agg’ with ‘PS’, ‘PDF’, ‘TkAgg’ and ‘WXAgg’ and noting whether all fail in the same way, or if only some do.

···

On Mon, Mar 9, 2009 at 10:43 AM, Jeremy Conlin <jeremit0@…287…> wrote:

I am using Mac OS X 10.5.5 and have installed Enthought’s latest Python distribution which includes Matplotlib 0.98.3. I get a fatal python error whenever I try to import matplotlib.pyplot. The exact message I get is:

Fatal Python error: Interpreter not initialized (version mismatch?)

Abort trap

Has anyone else had a problem with this? Please help me because I can’t do any plotting until it’s fixed!

Jeremy Conlin wrote:

I am using Mac OS X 10.5.5 and have installed Enthought's latest Python distribution which includes Matplotlib 0.98.3. I get a fatal python error whenever I try to import matplotlib.pyplot. The exact message I get is:

Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap

Has anyone else had a problem with this? Please help me because I can't do any plotting until it's fixed!

Thanks,
Jeremy

Jeremy: That usually means you are importing a module into a different version of python than it was built against. Are you sure you are running Enthough python when you import matplotlib?

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

Jeremy Conlin wrote:

I am using Mac OS X 10.5.5 and have installed Enthought's latest Python distribution which includes Matplotlib 0.98.3. I get a fatal python error whenever I try to import matplotlib.pyplot. The exact message I get is:

Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap

Has anyone else had a problem with this? Please help me because I can't do any plotting until it's fixed!

Thanks,
Jeremy

Jeremy: That sometimes means you are importing a module into a different version of python than it was built against. Are you sure you are running Enthough python when you import matplotlib?

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

I am using Mac OS X 10.5.5 and have installed Enthought’s latest Python distribution which includes Matplotlib 0.98.3. I get a fatal python error whenever I try to import matplotlib.pyplot. The exact message I get is:

Fatal Python error: Interpreter not initialized (version mismatch?)

Abort trap

Has anyone else had a problem with this? Please help me because I can’t do any plotting until it’s fixed!

So you haven’t installed matplotlib or wxpython separately? This error can arise when the version of python that built the extension is not the same as the version of python you are running. I suggest making sure you have a clean install of enthought python (remove the install dir entirely), reinstall it, and if you still see the same problem report it on the enthought list because it looks like a build problem more than a matplotlib problem.

I did not install matplotlib seperately. A while back I did play with wxpython and wxwidgets, but my Python script that uses those libraries still work well. I did just reinstall my enthought python this morning when I was having these problems. I didn’t delete anything before installing, I just assumed it would overwrite the old/bad stuff.

Before you report, you may want to do some extra diagnostics. Eg create a script like

import matplotlib
matplotlib.use(‘Agg’)
import matplotlib.pyplot

and try running this script, replacing ‘Agg’ with ‘PS’, ‘PDF’, ‘TkAgg’ and ‘WXAgg’ and noting whether all fail in the same way, or if only some do.

Now this was a good idea. Every backend worked except TkAgg which was my default specified in my ~/.matplotlib/matplotlibrc file.

Jeremy

···

On Mon, Mar 9, 2009 at 12:08 PM, John Hunter <jdh2358@…83…287…> wrote:

On Mon, Mar 9, 2009 at 10:43 AM, Jeremy Conlin <jeremit0@…287…> wrote: