[Numpy-discussion] distutils and SWIG problem

Branimir Sesar bsesar at astro.caltech.edu
Tue May 17 15:16:27 EDT 2011


Dear Numpy users,

I've been trying to compile Scikits ANN 
(http://projects.scipy.org/scikits/wiki/AnnWrapper) with Python 2.7.1, 
numpy 1.6.0, and SWIG 2.0.3 but the compilation breaks down down with 
this error:

running install
running bdist_egg
running egg_info
running build_src
build_src
building extension "scikits.ann._ANN" sources
Traceback (most recent call last):
   File "setup.py", line 139, in <module>
     test_suite = 'nose.collector',
   File 
"/home/bsesar/usr/pydebug/lib/python2.7/site-packages/numpy/distutils/core.py", 
line 186, in setup
     return old_setup(**new_attr)
   File "/home/bsesar/usr/pydebug/lib/python2.7/distutils/core.py", line 
152, in setup
     dist.run_commands()
   File "/home/bsesar/usr/pydebug/lib/python2.7/distutils/dist.py", line 
953, in run_commands
     self.run_command(cmd)
   File "/home/bsesar/usr/pydebug/lib/python2.7/distutils/dist.py", line 
972, in run_command
     cmd_obj.run()
   File 
"/home/bsesar/usr/pydebug/lib/python2.7/site-packages/numpy/distutils/command/install.py", 
line 57, in run
     r = self.setuptools_run()
   File 
"/home/bsesar/usr/pydebug/lib/python2.7/site-packages/numpy/distutils/command/install.py", 
line 51, in setuptools_run
     self.do_egg_install()
   File "build/bdist.linux-x86_64/egg/setuptools/command/install.py", 
line 96, in do_egg_install
   File "/home/bsesar/usr/pydebug/lib/python2.7/distutils/cmd.py", line 
326, in run_command
     self.distribution.run_command(command)
   File "/home/bsesar/usr/pydebug/lib/python2.7/distutils/dist.py", line 
972, in run_command
     cmd_obj.run()
   File "build/bdist.linux-x86_64/egg/setuptools/command/bdist_egg.py", 
line 167, in run
   File "/home/bsesar/usr/pydebug/lib/python2.7/distutils/cmd.py", line 
326, in run_command
     self.distribution.run_command(command)
   File "/home/bsesar/usr/pydebug/lib/python2.7/distutils/dist.py", line 
972, in run_command
     cmd_obj.run()
   File 
"/home/bsesar/usr/pydebug/lib/python2.7/site-packages/numpy/distutils/command/egg_info.py", 
line 8, in run
     self.run_command("build_src")
   File "/home/bsesar/usr/pydebug/lib/python2.7/distutils/cmd.py", line 
326, in run_command
     self.distribution.run_command(command)
   File "/home/bsesar/usr/pydebug/lib/python2.7/distutils/dist.py", line 
972, in run_command
     cmd_obj.run()
   File 
"/home/bsesar/usr/pydebug/lib/python2.7/site-packages/numpy/distutils/command/build_src.py", 
line 152, in run
     self.build_sources()
   File 
"/home/bsesar/usr/pydebug/lib/python2.7/site-packages/numpy/distutils/command/build_src.py", 
line 169, in build_sources
     self.build_extension_sources(ext)
   File 
"/home/bsesar/usr/pydebug/lib/python2.7/site-packages/numpy/distutils/command/build_src.py", 
line 332, in build_extension_sources
     sources = self.swig_sources(sources, ext)
   File 
"/home/bsesar/usr/pydebug/lib/python2.7/site-packages/numpy/distutils/command/build_src.py", 
line 646, in swig_sources
     extension.swig_opts.remove('-c++')
AttributeError: 'str' object has no attribute 'remove'

Is this a distutils bug or am I doing something wrong?

Thank you very much for your help,

Brani



More information about the NumPy-Discussion mailing list