mod_python compilation error in VS 2008 for py2.7.1

asimkon asimkostas at
Tue Jun 14 06:50:32 EDT 2016

I would like to ask you a technical question regarding python module
compilation for python 2.7.1.

I want to compile mod_python
for Apache 2.2 and py2.7 <> on Win32 in
order to use it for  psp - py scripts that i have written. I tried to
compile it using VS 2008 (VC++) and unfortunately i get an error on
pyconfig.h (Py2.7/include) error C2632: int followed by int  is illegal.

This problem occurs when i try to run the bat file that exists on
mod_python/dist folder. Any idea or suggestion what should i do in order to
run it on Win 7 Pro (win 32) environment and produce the final apache
executable module (.so).

 I have posted the same question here
but unfortunately i had had no luck!

Additionally i give you the compilation instructions that i follow (used
also MinGW-w64 and get the same error) in order to produce the final output!


Open a command prompt with VS2008 support. The easiest way to do this is to
use "Start | All Programs | Microsoft Visual Studio 2008 | Visual Studio
Tools | Visual Studio 2008 Command Prompt". (This puts the VS2008 binaries
in the path and sets up the lib/include environmental variables for the
Platform SDK.) to the mod_python\dist folder.

2.Tell mod_python where Apache is: set APACHESRC=C:\Apache

3. Run build_installer.bat.

If it succeeds, an installer.exe will be created in a subfolder. Run that
install the module.

Kind  Regards

Kostas Asimakopoulos

More information about the Python-list mailing list