[Python-Dev] Re: Timing for Py2.4

Jeremy Hylton jeremy at alum.mit.edu
Tue Mar 30 16:35:11 EST 2004


On Tue, 2004-03-30 at 16:28, Paul Moore wrote:
> Nope. I'm talking about the "build_ext" command. I have MSVC6
> installed, and the .NET framework MSVC7 compilers. If I have the free
> compilers in my PATH (I don't expect distutils to auto-detect the free
> compilers from the registry, as it does for MSVC6), and do python24
> setup.py build, I get the error:
> 
> >C:\Apps\Python24\python.exe setup.py build
> running build
> running build_py
> creating build
> creating build\lib.win32-2.4
> copying alarm.py -> build\lib.win32-2.4
> running build_ext
> error: Python was built with version 7.1 of Visual Studio, and
> extensions need to be built with the same version of the compiler,
> but it isn't installed.
> 
> So even though I have the free VC7 compiler, and it's in my PATH, I
> still can't build a simple extension with it. Even renaming the MSVC6
> registry key, to get it out of the way, didn't help.

You should be able to get it to work if you build Python with the free
VC7 compiler.  That's what the error message is trying to tell you:
"extensions need to be built with the same version of the compiler."

> Also, distutils adds optimisation flags to the command line, which
> don't work with the free compilers. Etc, etc.

I have a cheap copy of VC7 on my laptop -- the $100 one that doesn't
have an optimizer.  It issues a warning for the optimization flags, but
it still compiles.

Jeremy





More information about the Python-Dev mailing list