Building on Windows (Was Re: Calling all Mac OSX users!)

> The only thing worth providing might be the prebuilt static link libraries > and header files for zlib, libpng, and freetype for the 4 different MSC > compilers/runtime libraries.

This would be very helpful. I haven’t been able to track down the
plot_directive bugs on windows, because I haven’t been able to build
the dependencies with any luck.

Skipper

OK. I uploaded matplotlib-1.x-windows-link-libraries.zip at
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>.

That’s awesome. Thanks!

The archive contains zlib-1.2.5, libpng-1.4.8, and freetype-2.4.6 link
libraries and header files for the build systems listed below.

All other Python package dependencies can also be downloaded from that

page. Let me know if anything is missing.

A description on how to build Python 2.6+ extensions using the free
Windows SDK 7.0 is at
<http://wiki.cython.org/64BitCythonExtensionsOnWindows>. I have not

tested it with mpl though.

This is how I’ve been building python packages with extension on Windows if I need to, but I wouldn’t know how to build the dependencies. Can you recommend a good resource for doing so/learning to do so with SDK?

Now for MPL, I just dropped the msvcr90-x64 files into my matplotlib source directory because I got tired of messing with setupext.py to try to point to them. I receive the following error

c:\users\skipper\src\matplotlib\zconf.h(380) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

error: Command “cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I. -IC:\Python27\lib\site-packages\numpy\core\include -I. -IC:\Python27\include -IC:\Python27\PC /Tpsrc/_png.cpp /Fobuild\temp.win-amd64-2.7\Release\src/_png.obj” failed with exit status 2

Whole build log is here: http://pastebin.com/EfxYjMnL

Thanks,

Skipper

···

On Wed, Aug 17, 2011 at 4:21 PM, Christoph Gohlke <cgohlke@…244…> wrote:

On 8/17/2011 12:03 PM, Skipper Seabold wrote:

On Wed, Aug 17, 2011 at 4:49 AM, Christoph Gohlke<cgohlke@…244…> wrote:

Christoph

msvcr71-x32

Python 2.5 32 bit

Visual Studio .NET 2003
MS C Compiler 13.10
MSVCR71.DLL C runtime

msvcrt-x64

Python 2.5 64 bit
Microsoft Platform SDK for Windows Server 2003 R2
MS C Compiler 13.10
MSVCRT.DLL C runtime

msvcr90-x32

Python 2.6, 2.7, 3.1, 3.2 32 bit
Microsoft Visual Studio 2008 Pro
(or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5

Service Pack 1)
MS C Compiler 15.0
MSVCR90.DLL C runtime

msvcr90-x64

Python 2.6, 2.7, 3.1, 3.2 64 bit
Microsoft Visual Studio 2008 Pro
(or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5

Service Pack 1)
MS C Compiler 15.0
MSVCR90.DLL C runtime

> <snip>
>> The only thing worth providing might be the prebuilt static link

libraries

>> and header files for zlib, libpng, and freetype for the 4 different MSC
>> compilers/runtime libraries.
>
> This would be very helpful. I haven't been able to track down the
> plot_directive bugs on windows, because I haven't been able to build
> the dependencies with any luck.
>
> Skipper
>

OK. I uploaded matplotlib-1.x-windows-link-libraries.zip at
<Archived: Python Extension Packages for Windows - Christoph Gohlke.

That's awesome. Thanks!

The archive contains zlib-1.2.5, libpng-1.4.8, and freetype-2.4.6 link
libraries and header files for the build systems listed below.

All other Python package dependencies can also be downloaded from that
page. Let me know if anything is missing.

A description on how to build Python 2.6+ extensions using the free
Windows SDK 7.0 is at
<http://wiki.cython.org/64BitCythonExtensionsOnWindows&gt;\. I have not
tested it with mpl though.

This is how I've been building python packages with extension on Windows
if I need to, but I wouldn't know how to build the dependencies. Can you
recommend a good resource for doing so/learning to do so with SDK?

Almost every library is different. Some require CMake, others scons, devenv, nmake, Perl... Refer to the readme or install files.

Now for MPL, I just dropped the msvcr90-x64 files into my matplotlib
source directory because I got tired of messing with setupext.py to try
to point to them.

Try adding the directory containing the lib and include files to the LIB and INCLUDE environment variables.

I receive the following error

<snip>
c:\users\skipper\src\matplotlib\zconf.h(380) : fatal error C1083: Cannot
open include file: 'unistd.h': No such file or directory
error: Command "cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG
-DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I.
-IC:\Python27\lib\site-packages\numpy\core\include -I.
-IC:\Python27\include -IC:\Python27\PC /Tpsrc/_png.cpp
/Fobuild\temp.win-amd64-2.7\Release\src/_png.obj" failed with exit status 2

Whole build log is here: matplotlib windows build fail log - Pastebin.com

Use an empty unistd.h file. I have added that to the zip file.

Christoph

···

On 8/17/2011 4:05 PM, Skipper Seabold wrote:

On Wed, Aug 17, 2011 at 4:21 PM, Christoph Gohlke <cgohlke@...244... > <mailto:cgohlke@…244…>> wrote:

On 8/17/2011 12:03 PM, Skipper Seabold wrote:
> On Wed, Aug 17, 2011 at 4:49 AM, Christoph Gohlke<cgohlke@...244... > <mailto:cgohlke@…244…>> wrote:

Thanks,

Skipper

Christoph

msvcr71-x32
-----------
Python 2.5 32 bit
Visual Studio .NET 2003
MS C Compiler 13.10
MSVCR71.DLL C runtime

msvcrt-x64
----------
Python 2.5 64 bit
Microsoft Platform SDK for Windows Server 2003 R2
MS C Compiler 13.10
MSVCRT.DLL C runtime

msvcr90-x32
-----------
Python 2.6, 2.7, 3.1, 3.2 32 bit
Microsoft Visual Studio 2008 Pro
(or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5
Service Pack 1)
MS C Compiler 15.0
MSVCR90.DLL C runtime

msvcr90-x64
-----------
Python 2.6, 2.7, 3.1, 3.2 64 bit
Microsoft Visual Studio 2008 Pro
(or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5
Service Pack 1)
MS C Compiler 15.0
MSVCR90.DLL C runtime

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

>>
>>
>> > <snip>
>> >> The only thing worth providing might be the prebuilt static link
> libraries
>> >> and header files for zlib, libpng, and freetype for the 4 different MSC
>> >> compilers/runtime libraries.
>> >
>> > This would be very helpful. I haven't been able to track down the
>> > plot_directive bugs on windows, because I haven't been able to build
>> > the dependencies with any luck.
>> >
>> > Skipper
>> >
>>
>>
>> OK. I uploaded matplotlib-1.x-windows-link-libraries.zip at
>> <Archived: Python Extension Packages for Windows - Christoph Gohlke.
>>
>
> That's awesome. Thanks!
>
>> The archive contains zlib-1.2.5, libpng-1.4.8, and freetype-2.4.6 link
>> libraries and header files for the build systems listed below.
>>
>> All other Python package dependencies can also be downloaded from that
>> page. Let me know if anything is missing.
>>
>> A description on how to build Python 2.6+ extensions using the free
>> Windows SDK 7.0 is at
>> <http://wiki.cython.org/64BitCythonExtensionsOnWindows&gt;\. I have not
>> tested it with mpl though.
>>
>
> This is how I've been building python packages with extension on Windows
> if I need to, but I wouldn't know how to build the dependencies. Can you
> recommend a good resource for doing so/learning to do so with SDK?

Almost every library is different. Some require CMake, others scons,
devenv, nmake, Perl... Refer to the readme or install files.

Right. Thanks. I got some ways there building zlib dependency with
nmake and/or vcbuild. They appear to be working at least.

>
> Now for MPL, I just dropped the msvcr90-x64 files into my matplotlib
> source directory because I got tired of messing with setupext.py to try
> to point to them.

Try adding the directory containing the lib and include files to the LIB
and INCLUDE environment variables.

>I receive the following error
>
> <snip>
> c:\users\skipper\src\matplotlib\zconf.h(380) : fatal error C1083: Cannot
> open include file: 'unistd.h': No such file or directory
> error: Command "cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG
> -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I.
> -IC:\Python27\lib\site-packages\numpy\core\include -I.
> -IC:\Python27\include -IC:\Python27\PC /Tpsrc/_png.cpp
> /Fobuild\temp.win-amd64-2.7\Release\src/_png.obj" failed with exit status 2
>
> Whole build log is here: matplotlib windows build fail log - Pastebin.com

Use an empty unistd.h file. I have added that to the zip file.

Thanks, that did the trick. Working mpl from source on windows 7,
python 2.7, 64-bit.

Skipper

···

On Wed, Aug 17, 2011 at 7:33 PM, Christoph Gohlke <cgohlke@...244...> wrote:

On 8/17/2011 4:05 PM, Skipper Seabold wrote:
> On Wed, Aug 17, 2011 at 4:21 PM, Christoph Gohlke <cgohlke@...244... > > <mailto:cgohlke@…244…>> wrote:
>> On 8/17/2011 12:03 PM, Skipper Seabold wrote:
>> > On Wed, Aug 17, 2011 at 4:49 AM, Christoph Gohlke<cgohlke@...244... > > <mailto:cgohlke@…244…>> wrote:

Christoph

>
> Thanks,
>
> Skipper
>
>> Christoph
>>
>>
>> msvcr71-x32
>> -----------
>> Python 2.5 32 bit
>> Visual Studio .NET 2003
>> MS C Compiler 13.10
>> MSVCR71.DLL C runtime
>>
>> msvcrt-x64
>> ----------
>> Python 2.5 64 bit
>> Microsoft Platform SDK for Windows Server 2003 R2
>> MS C Compiler 13.10
>> MSVCRT.DLL C runtime
>>
>> msvcr90-x32
>> -----------
>> Python 2.6, 2.7, 3.1, 3.2 32 bit
>> Microsoft Visual Studio 2008 Pro
>> (or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5
>> Service Pack 1)
>> MS C Compiler 15.0
>> MSVCR90.DLL C runtime
>>
>> msvcr90-x64
>> -----------
>> Python 2.6, 2.7, 3.1, 3.2 64 bit
>> Microsoft Visual Studio 2008 Pro
>> (or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5
>> Service Pack 1)
>> MS C Compiler 15.0
>> MSVCR90.DLL C runtime
>>
>
>
>
>
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>
>
>
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> matplotlib-devel List Signup and Options

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options