compiling modules with VS 2008 for python 2.4 prepared with Visual Studio 2003

Alex Martelli aleax at mac.com
Wed Apr 4 23:09:31 EDT 2007


alf <ask at me> wrote:

> Hi,
> 
> I want to add some library but it can not be comipled? Here is an output:

If you don't have the needed compiler installed (in this case, VS 2003,
while it looks like your installation has VS 2005 instead), sure.


> D:\>cl
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42
> for 80x86
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> usage: cl [ option... ] filename... [ /link linkoption... ]
> 
> 
> D:\> python setup.py install
> running install
> running build
> running build_ext
> error: Python was built with Visual Studio 2003;
> extensions must be built with a compiler than can generate compatible
> binaries.
> Visual Studio 2003 was not found on this system. If you have Cygwin
> installed,
> you can try compiling with MingW32, by passing "-c mingw32" to setup.py.

I would think this error message is as clear as it can be, and then
some!  It even gives very practical advice on how to work around the
problem.  Either install VS2003, if you own it or can purchase it, or
else install mingw32 (which is free and can be downloaded) and use the
option which the error message tells you to.


Alex



More information about the Python-list mailing list