views:

350

answers:

3

I've been asked to provide Numpy & Scipy as python egg files. Unfortunately Numpy and Scipy do not make official releases of their product in .egg form for a Win32 platform - that means if I want eggs then I have to compile them myself.

At the moment my employer provides Visual Studio.Net 2003, which will compile no version of Numpy later than 1.1.1 - every version released subsequently cannot be compiled with VS2003.

What I'd really like is some other compiler I can use, perhaps for free, but at a push as a free time-limited trial... I can use that to compile the eggs. Is anybody aware of another compiler that I can get and use without paying anything and will definitely compile Numpy on Windows?

Please only suggest something if you know for a fact that that it will compile Numpy - no speculation!

Thanks

Notes: I work for an organization which is very sensitive about legal matters, so everything I do has to be totally legit. I've got to do everything according to licensed terms, and will be audited.

My environment:

  • Windows 32
  • Standard C Python 2.4.4
+2  A: 

Try compiling the whole Python stack with MinGW32. This is a GCC-Win32 development environment that can be used to build Python and a wide variety of software. You will probably have to compile the whole Python distribution with it. Here is a guide to compiling Python with MinGW. Note that you will probably have to provide a python distribution that is compiled with MinGW32 as well.

If recompiling the Python distro is not a goer I believe that Python 2.4 is compiled using VS2003. You are probably stuck with back-porting Scipy and Numpy to VS2003 or paying a consultant to do it. I would dig out the relevant mailing lists or contact the maintainers and get some view of the effort that would be required to do it.

Another alternative would be to upgrade the version of Python to a more recent one but you will probably have to regression test your application and upgrade the version of Visual Studio to 2005 or 2008.

ConcernedOfTunbridgeWells
No good - we use a stock CPython from python.org. We cannot use a special python. :-(
Salim Fadhley
There is absolutely no need to build your own python to build numpy (or any package for that matter) with mingw.
David Cournapeau
+1  A: 

You could try GCC for Windows. GCC is the compiler most often used for compiling Numpy/Scipy (or anything else, really) on Linux, so it seems reasonable that it should work on Windows too. (Never tried it myself, though)

And of course it's distributed under the GPL, so there shouldn't be any legal barriers.

David Zaslavsky
The GCC coming with mingw is support by numpy. It is actually the compiler I use to build the official windows installers.
David Cournapeau
A: 

If you just need the compiler, it is part of the .NET framework.

For instance, you can find the 3.5 framework (Which is used be visual studio 2008) in:

"C:\Windows\Microsoft.NET\Framework\v3.5"
chills42
You cannot reliably compile numpy (or any python extension) for python 2.4 with VS 2008. You need to use the same compiler as the one python itself was built with, which is VS 2003 in python 2.4 case
David Cournapeau