distutils problem windows xp python 2.4.2
Scott David Daniels
scott.daniels at acm.org
Sat Dec 3 20:13:19 EST 2005
ajikoe at gmail.com wrote:
> Hello I tried to combine c++ and python together.
> So I follow from this website:
> http://kortis.to/radix/python_ext/
> ....
> and my setup.py file:
> from distutils.core import setup, Extension
> module = Extension('pr', sources = ['prmodule.c'])
> setup(name = 'Pr test', version = '1.0', ext_modules = [module])
>
> ------------------------------------
> If I run setup build
> I've got the following error message
> running build
> running build_ext
> error: The .NET Framework SDK needs to be installed before building
> extensions for Python.
>
> I use visual Studio 2005.
>
> Thanks,
> pujo
>
You might take a look at:
http://groups.google.com/group/comp.lang.python/msg/2341e3ac80ae5052?dmode=source
it provides code to change your setup code to:
from distutils.core import setup, Extension
module = Extension('pr', sources = ['prmodule.c'])
for attempts in range(2):
try:
setup(name='Pr test',
version='1.0',
ext_modules=[module])
except SystemExit, e: pass # Failure. Patch and try again
else: break # Successful run, no need to retry.
print '*** Apparently a failure:', e.args[0]
print '*** Patching and trying again'
import patch_msvccompiler
--Scott David Daniels
scott.daniels at acm.org
More information about the Python-list
mailing list