distutils, No module named numpy.distutils.fcompiler.conv_template

Luis Alberto Zarrabeitia Gomez kyrie at uh.cu
Mon Mar 30 11:56:35 EDT 2009


I'm trying to compile the wrappers for ANN (Approximate Nearest Neighbor) from
http://scipy.org/scipy/scikits/wiki/AnnWrapper, either the main one (scikits) or
the attachment in the main page.

However, the command "python setup.py build" produces the exception:

  "ImportError: No module named numpy.distutils.fcompiler.conv_template"

There is no conv_template in numpy.distutils.fcompiler, but there is one at
numpy.distutils. Grepping for conv_template at /usr/lib/python2.5/distutils/
produces no results, and grepping for it at
/usr/lib/python2.5/site-packages/numpy/ returns only 

==
/[...]/numpy/distutils/command/build_src.py:from numpy.distutils.conv_template
import process_file as process_c_file
/[...]/numpy/distutils/command/build_src.py:                       
log.info("conv_template:> %s" % (target_file))
==

i.e, it is being imported from distutils and not from fcompiler. 

What's going on here? It is an ubuntu bug? (intrepid) Am I missing some
packages? This happens regardless of if the ANN library exists or not.

If I try to softlink the distutils/conv_template.py module to the fcompiler
directory, I start getting the same symptoms with other modules:
numpy_distribution, extension, interactive.


K.

P.S: Traceback follows.

kyrie at home:~/downloads/ann$ python setup.py build
running build
running scons
customize UnixCCompiler
Found executable /usr/bin/gcc
Traceback (most recent call last):
  File "setup.py", line 41, in <module>
    classifiers = filter(None, classifiers.split("\n")),
  File "/usr/lib/python2.5/site-packages/numpy/distutils/core.py", line 184, in
setup
    return old_setup(**new_attr)
  File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.5/site-packages/numpy/distutils/command/build.py", line
38, in run
    self.run_command('scons')
  File "/usr/lib/python2.5/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.5/distutils/dist.py", line 993, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python2.5/distutils/cmd.py", line 117, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python2.5/site-packages/numpy/distutils/command/scons.py", line
310, in finalize_options
    force = self.force)
  File "/usr/lib/python2.5/site-packages/numpy/distutils/fcompiler/__init__.py",
line 804, in new_fcompiler
    load_all_fcompiler_classes()
  File "/usr/lib/python2.5/site-packages/numpy/distutils/fcompiler/__init__.py",
line 715, in load_all_fcompiler_classes
    __import__ (module_name)
  File "/usr/lib/python2.5/ihooks.py", line 405, in import_module
    m = self.load_tail(q, tail)
  File "/usr/lib/python2.5/ihooks.py", line 458, in load_tail
    raise ImportError, "No module named " + mname
ImportError: No module named numpy.distutils.fcompiler.conv_template



-- 
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie





-- 
Participe en Universidad 2010, del 8 al 12 de febrero de 2010
La Habana, Cuba 
http://www.universidad2010.cu




More information about the Python-list mailing list