[SciPy-dev] NumPy import problem.

Travis Oliphant oliphant.travis at ieee.org
Fri Jan 6 16:26:10 EST 2006


Charles R Harris wrote:

> If I try to import numpy from python in my home directory I get the 
> following error:
>
> >>> from numpy import *
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.3/site-packages/numpy/__init__.py", line 59, in ?
>     from core import *
>   File "/usr/lib/python2.3/site-packages/numpy/core/__init__.py", line 
> 27, in ?
>     test = ScipyTest().test
>   File "/usr/lib/python2.3/site-packages/numpy/testing/numpytest.py", 
> line 210, in __init__
>     from numpy.distutils.misc_util import get_frame
>   File "/usr/lib/python2.3/site-packages/numpy/distutils/__init__.py", 
> line 5, in ?
>     import ccompiler
>   File 
> "/usr/lib/python2.3/site-packages/numpy/distutils/ccompiler.py", line 
> 32, in ?
>     CCompiler.spawn = new.instancemethod(CCompiler_spawn,None,CCompiler)
> AttributeError: 'module' object has no attribute 'instancemethod'
>
> Oddly enough, this doesn't happen in ipython or if I run python in 
> /usr/lib/python2.3/site-packages/numpy/ . There must be a path problem 
> someplace. Numpy was installed from the version in svn as of 1/2 hour ago.
>

do

import pdb
pdb.pm()

p type(new)
p new.__file__

This might help figure it out...

-Travis




More information about the SciPy-Dev mailing list