Hello all,

I finally, after much pain and anguish, succeeded at compiling MPL with
GTKAgg on windows and I thought people might be interested to know how I
managed it.  Of course, your mileage may vary...


   1. Install Python (I used the Python (x,y) distribution of 2.6:
   http://code.google.com/p/pythonxy/wiki/Downloads
   2. Install the GTK bits and pieces.  For some reason using the newest
   ones causes some problems with paths.  I can confirm that this set works on
   at least two computers:
   
Glade3.6.7withGTK+.exe<http://ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.6/glade3-3.6.7-with-GTK+.exe>
   (Install this to c:\GTK so that MPL build can find it without playing with
   paths)
   
pygtk-2.12.1-3.win32-py2.6.exe<http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.12/pygtk-2.12.1-3.win32-py2.6.exe>
   
pycairo-1.4.12-2.win32-py2.6.exe<http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.4/pycairo-1.4.12-2.win32-py2.6.exe>
   
pygobject-2.14.2-2.win32-py2.6.exe<http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.14/pygobject-2.14.2-2.win32-py2.6.exe>
   3. Install 
libpng<http://downloads.sourceforge.net/gnuwin32/libpng-1.2.37-setup.exe>and
   freetype <http://gnuwin32.sourceforge.net/downlinks/freetype.php> using
   the installers (also includes the zlib dll).  They will default to install
   to c:\Program Files\GnuWin32 . This is fine, but note the location.
   4. Either checkout the MPL source from subversion, or download a
tarball<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/?view=tar>and
unpack it
   5. Download the win32_static
files<http://matplotlib.sourceforge.net/win32_static_vs.tar.gz>,
   and unpack them to the place where your MPL source is, you should then have
   a folder in the MPL source folder called win32_static
   6. Open the file setupext.py in the MPL source folder
   7. Edit line 51 (or so) to read:: 'win32' : ['win32_static','c:\\Program
   Files\\GnuWin32']
   8. Install Visual Studio 2008
Express<http://www.microsoft.com/express/Downloads/#2008-Visual-CPP>if
you do not have a version of Visual Studio 2008 on your computer
   9. Open a console and type:: python setup.py build --compiler=msvc
   bdist_wininst
   10. Wait for it to finish, then:: python setup.py install  to install MPL
   11. If everything worked right, you should be able to open a python shell
   and type
   >> import matplotlib
   >> matplotlib.use('GTKAgg')
   >> import pylab
   >> pylab.plot(0,4,'s')
   >> pylab.show()
   12. And you should see a GTK rendered plot window with a small square in
   the center hopefully

Improvements to this procedure would be greatly appreciated - but this
finally seems to work..

Regards,
Ian
----
Ian Bell
Graduate Research Assistant
Herrick Labs
Purdue University
email: ib...@purdue.edu
cell: (607)227-7626
------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to