[Numpy-discussion] Numpy compilation error

Robert Kern robert.kern@gmail....
Fri Apr 16 18:11:09 CDT 2010


On Fri, Apr 16, 2010 at 17:59, Pradeep Jha <jhapk@utias.utoronto.ca> wrote:
> Hi,
>
> I am trying to install a software called Cantera which uses numpy. When I
> run the make command, during the installation it gives me the following
> error:
>
> /bin/rm -f _build
> (CXX="g++"; export CXX; CC="g++"; export CC; CFLAGS="-O3 -Wall     -fPIC";
> export CFLAGS; PURIFY=""; export PURIFY; /usr/bin/python2 setup.py build)
> Traceback (most recent call last):
>   File "setup.py", line 3, in ?
>     from distutils.core import setup, Extension
>   File
> "/nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy/distutils/__init__.py",
> line 6, in ?
>     import ccompiler
>   File
> "/nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy/distutils/ccompiler.py",
> line 7, in ?
>     from distutils import ccompiler
> ImportError: cannot import name ccompiler
> make[1]: *** [_build] Error 1
> make[1]: Leaving directory
> `/nfs/carv/d1/people/pradeep/cantera/Cantera/python'
> make: *** [python] Error 2
>
> My numpy is stored in the following directory
> /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/
>
> I am running Linux (Fedora). When I do a sys.path in command line Python,
> the output is:
> ['', '/nfs/carv/d1/people/pradeep/src/numpy-1.3.0',
> '/nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy',

You should not have these two entries in your sys.path. Did you add
them yourself via PYTHONPATH? If so, remove them.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the NumPy-Discussion mailing list