Matplotlib for Python scripting in ArcGIS 10 does not work

Discussion created by werner.rolf on Jun 29, 2011
Latest reply on Feb 12, 2014 by SWalbridge-esristaff
I use ArcGIS 10 and would like to run Matplotlib to create charts within a python script. Therefore I have installed
- numpy-1.6.1rc1-win32-superpack-python2.6.exe
- matplotlib-1.0.1.win32-py2.6.exe

as noted here: http://matplotlib.sourceforge.net/users/installing.html

If I test a script to check the installation like:

import numpy
arcpy.AddMessage("NUMPY Version " + numpy.__version__)

import matplotlib
arcpy.AddMessage("MATPLOTLIB Version " + matplotlib.__version__)

I get the following error:
Running script Script...
NUMPY Version 1.6.1rc1
<type 'exceptions.AttributeError'>: 'module' object has no attribute '__version__'
Failed to execute (Script).

Also the command
- import pylab as pl

leads to the error
<type 'exceptions.ImportError'>: No module named pylab
Failed to execute (Script).

So even matplotlib is installed properly in the directory "site-packages" (see screenshot of directory structure attached) it does not work in ArcGIS.

By the way if I let it run in iPython (same installation) it works perfect.

What still needs to be done to get matplotlib work in ArcGIS 10?