Building MPL Releases for Windows

Greetings,

I recently recreated my development environment on my windows machine and have attempted to build MPL off the SVN trunk. I am able to successfully compile and build windows installers using both Python 2.5.4 and Python 2.6.4 using MinGW. However, when I install my builds and try to use them I have some issues.

First, I was unable to build MPL using libpng-1.4.0. I was forced to revert to libpng-1.2.40

Python 2.5.4

  1. After successfully building MPL with GTK support (Yes - I can import GTK in my Python interpreter with no problems.), I am unable to show or save figures using MPL. Using IPython, I was able to create the figure instance but Python quits when trying to display or save said figure instance.

  2. After rebuilding MPL without GTK support, I get the same errors.

Python 2.6.4

  1. I am able to display figure instances using MPL build with GTK support. However, when I try to save the figure (in any format) Python quits.

  2. I get the same behavior when I build MPL without GTK support.

I have tried building MPL by building the dependencies myself and also with using the win32_static/win32_static_mingw32 folders and get the same issues either way. I am hoping whoever is responsible for building the windows binaries is willing to work with me to solve these issues. I’d like to be able to build MPL successfully using both Python 2.5.4 and Python 2.6.4 and then write up a detailed How-To build on Windows.

Any help would be appreciated.

Thanks,

Patrick

···


Patrick Marsh
Ph.D. Student / Graduate Research Assistant
School of Meteorology / University of Oklahoma

Cooperative Institute for Mesoscale Meteorological Studies
National Severe Storms Laboratory
http://www.patricktmarsh.com

Hello,

The current matplotlib installers for Windows are built with Microsoft
Visual Studio 2003/2008 compilers. It is relatively easy once you have
all the dependencies and it gives you working binaries for Python 2.4,
2.5, 2.6, and 2.6 64-bit.

I have found the instructions at
<http://matplotlib.sourceforge.net/users/installing.html> and
<http://docs.python.org/install/> sufficient for building matplotlib
from sources. My setup.cfg is attached.

Matplotlib, when compiled with mingw, had some problems saving png
images
<http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg11791.html>.
Can you save to pdf?

I have not tried libpng-1.2.40, it is three weeks old, but version
1.2.42 works when PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN,
PNG_ALLOCATED, PNG_DEPSTRUCT, PNG_STDIO_SUPPORTED, and
PNG_SEQUENTIAL_READ_SUPPORTED are defined.

I can not reproduce the GTK problems with the latest official matplotlib
0.99.1, pyGTK 2.12.1-3, and GTK 2.16.6 binaries. Are you using the GTK
or GTKAgg backend?

setup.cfg (2.94 KB)

···

--
Christoph Gohlke
Laboratory for Fluorescence Dynamics
University of California, Irvine
http://www.lfd.uci.edu/~gohlke/

On 1/20/2010 2:21 PM, Patrick Marsh wrote:

Greetings,

I recently recreated my development environment on my windows machine
and have attempted to build MPL off the SVN trunk. I am able to
successfully compile and build windows installers using both Python
2.5.4 and Python 2.6.4 using MinGW. However, when I install my builds
and try to use them I have some issues.

First, I was unable to build MPL using libpng-1.4.0. I was forced to
revert to libpng-1.2.40

Python 2.5.4
1. After successfully building MPL with GTK support (Yes - I can import
GTK in my Python interpreter with no problems.), I am unable to show or
save figures using MPL. Using IPython, I was able to create the figure
instance but Python quits when trying to display or save said figure
instance.

2. After rebuilding MPL without GTK support, I get the same errors.

Python 2.6.4
1. I am able to display figure instances using MPL build with GTK
support. However, when I try to save the figure (in any format) Python
quits.

2. I get the same behavior when I build MPL without GTK support.

I have tried building MPL by building the dependencies myself and also
with using the win32_static/win32_static_mingw32 folders and get the
same issues either way. I am hoping whoever is responsible for building
the windows binaries is willing to work with me to solve these issues.
I'd like to be able to build MPL successfully using both Python 2.5.4
and Python 2.6.4 and then write up a detailed How-To build on Windows.

Any help would be appreciated.

Thanks,
Patrick