Compiling Python (modules) on 64bit Windows - which compiler suite?

R

Ralph Heinkel

Hi,

when processing our mass spectrometry data we are running against the
2GB memory limit on our 32 bit machines. So we are planning to move to
64bit. Downloading and installing the 64bit version of Python for
Windows is trivial, but how do we compile our own C extension? Visual C
++ 2008 express comes for free, but only compiles for 32 bit.

What has been used to compile the downloadable Python Win64 bit
version? Visual Studio professional?
The problem with the professional edition is that it is hard to obtain
and it is sort of out-of-date - nowadays everyone uses Visual Studio
2010 (or even 2011 coming soon). So if Visual Studio 2008 professional
is required for compiling 64bit modules, we would have to spend $1200
for a license which is actually rather out of date.

Any hints or suggestions are very welcome.

Thanks,

Ralph
 
T

Terry Reedy

when processing our mass spectrometry data we are running against the
2GB memory limit on our 32 bit machines. So we are planning to move to
64bit. Downloading and installing the 64bit version of Python for
Windows is trivial, but how do we compile our own C extension? Visual C
++ 2008 express comes for free, but only compiles for 32 bit.

What has been used to compile the downloadable Python Win64 bit
version? Visual Studio professional?

Yes. Python Windows devs get it for free from MS.
The problem with the professional edition is that it is hard to obtain
and it is sort of out-of-date - nowadays everyone uses Visual Studio
2010 (or even 2011 coming soon). So if Visual Studio 2008 professional
is required for compiling 64bit modules, we would have to spend $1200
for a license which is actually rather out of date.

Any hints or suggestions are very welcome.

I believe the intention is to release 3.3 compiled with VS 2010. Brian
Curtin and Martin Loewis are working on that. I believe people have
successfully built at least the basics with VS2010.

You could also dual boot to Linux and get 64 bit gcc for free.
 
D

Dennis Lee Bieber

Hi,

when processing our mass spectrometry data we are running against the
2GB memory limit on our 32 bit machines. So we are planning to move to
64bit. Downloading and installing the 64bit version of Python for
Windows is trivial, but how do we compile our own C extension? Visual C
++ 2008 express comes for free, but only compiles for 32 bit.
I believe the 64-bit compilers are available in the .NET SDK... You
then need to configure Express to find them.

http://msdn.microsoft.com/en-us/library/9yb4317s(v=vs.90).aspx
 
T

Thomas Bach

Hi,

Ralph Heinkel said:
Hi,

when processing our mass spectrometry data we are running against the
2GB memory limit on our 32 bit machines. So we are planning to move to
64bit. Downloading and installing the 64bit version of Python for
Windows is trivial, but how do we compile our own C extension?

What about installing Cygwin and using the shipped GCC?

Regards,
Thomas Bach.
 
C

cjgohlke

Hi,

when processing our mass spectrometry data we are running against the
2GB memory limit on our 32 bit machines. So we are planning to move to
64bit. Downloading and installing the 64bit version of Python for
Windows is trivial, but how do we compile our own C extension? Visual C
++ 2008 express comes for free, but only compiles for 32 bit.

What has been used to compile the downloadable Python Win64 bit
version? Visual Studio professional?
The problem with the professional edition is that it is hard to obtain
and it is sort of out-of-date - nowadays everyone uses Visual Studio
2010 (or even 2011 coming soon). So if Visual Studio 2008 professional
is required for compiling 64bit modules, we would have to spend $1200
for a license which is actually rather out of date.

Any hints or suggestions are very welcome.

Thanks,

Ralph

See "Compiling 64-bit extension modules on Windows" at <http://wiki.cython.org/64BitCythonExtensionsOnWindows>. It applies to non-Cython extensions as well.

MinGW-w64 also works, but you'll have to generate and use libpythonXX.a and libmsvcr90.a link libraries.

Christoph
 
S

Stefan Behnel

Thomas Bach, 21.03.2012 20:03:
What about installing Cygwin and using the shipped GCC?

I'm pretty sure it doesn't cross compile to native Windows. It certainly
won't build against a native Windows Python installation, and given the
overhead that cygwin induces into a lot of common OS operations (such as
fork(), I/O operations or file system access), a native Windows Python
installation has serious advantages in most cases.

If the choice is GCC, then MinGW is the right tool.

Stefan
 
R

Ralph Heinkel

See "Compiling 64-bit extension modules on Windows" at <http://wiki.cython.org/64BitCythonExtensionsOnWindows>. It applies to non-Cython extensions as well.

MinGW-w64 also works, but you'll have to generate and use libpythonXX.a and libmsvcr90.a link libraries.

Christoph

Thanks to everyone who has replied to my question.
Especially for the link/hint to use the .NET SDK which indeed seems to provide the right tools for 64bit compilation.
I'm going to try this and report back here.

Cheers,

Ralph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top