[SciPy-User] Error installing scipy

Travis Oliphant oliphant at enthought.com
Fri Oct 29 00:38:13 EDT 2010


I'm not sure if you got an answer to this question: 

But, this error can happen if you have a different version of NumPy than scipy-0.8 was compiled with.

-Travis


On Oct 27, 2010, at 10:58 AM, Di Zou wrote:

> Well I got the latest svn scipy and scipy-0.8 installed today. I don't know what I changed. Maybe I did something different today that I didn't do yesterday with my PYTHONPATH. Now I am getting an error in my code. This is my code:
> 
> import numpy as np
> import scipy as sp
> from scipy import stats
> 
> I get a segfault with 'from scipy import stats'. I went through with the debugger and this is the traceback I get:
> 
> 68 area321-n09.arl.army.mil> python -m pdb test.py
> > /share/dizou/Network_Analysis_Tools/test.py(1)<module>()
> -> import numpy as np
> (Pdb) n
> > /share/dizou/Network_Analysis_Tools/test.py(2)<module>()
> -> import scipy as sp
> (Pdb) n
> > /share/dizou/Network_Analysis_Tools/test.py(3)<module>()
> -> from scipy import stats
> (Pdb) s
> --Call--
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/__init__.py(5)<module>()
> -> from info import __doc__
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/__init__.py(5)<module>()
> -> from info import __doc__
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/__init__.py(7)<module>()
> -> from stats import *
> (Pdb) s
> --Call--
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/stats.py(131)<module>()
> -> """
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/stats.py(131)<module>()
> -> """
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/stats.py(194)<module>()
> -> import warnings
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/stats.py(195)<module>()
> -> import math
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/stats.py(198)<module>()
> -> pysum = sum  # save it before it gets overwritten
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/stats.py(201)<module>()
> -> from numpy import array, asarray, dot, ma, zeros, sum
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/stats/stats.py(202)<module>()
> -> import scipy.special as special
> (Pdb) s
> --Call--
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/special/__init__.py(5)<module>()
> -> from info import __doc__, __docformat__
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/special/__init__.py(5)<module>()
> -> from info import __doc__, __docformat__
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/special/__init__.py(8)<module>()
> -> from basic import *
> (Pdb) s
> --Call--
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/special/basic.py(5)<module>()
> -> from numpy import *
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/special/basic.py(5)<module>()
> -> from numpy import *
> (Pdb) s
> > /share/dizou/local/scipy-0.8/lib/python2.6/site-packages/scipy/special/basic.py(6)<module>()
> -> from _cephes import *
> (Pdb) s
> Segmentation fault (core dumped)
> 
> I do have a '_cephes.so' library in my 'scipy/lib/python2.6/site-packages/scipy/special' directory.
> From: David <david at silveregg.co.jp>
> To: SciPy Users List <scipy-user at scipy.org>
> Sent: Tue, October 26, 2010 9:09:05 PM
> Subject: Re: [SciPy-User] Error installing scipy
> 
> On 10/27/2010 03:52 AM, Di Zou wrote:
> > Hi,
> >
> > I am trying to install scipy 0.8 on Red Hat 5. I have numpy 1.5.1 and
> > python 2.6.
> > When I do 'python setup.py install
> > --prefix=/share/dizou/local/scipy-0.8' I get this error:
> > File "setup.py", line 160, in <module>
> > setup_package()
> > File "setup.py", line 127, in setup_package
> > from numpy.distutils.core import setup
> > File
> > "/share/dizou/local/numpy-1.5.1/lib/python2.6/site-packages/numpy/distutils/__init__.py",
> > line 7, in <module>
> > import ccompiler
> > File
> > "/share/dizou/local/numpy-1.5.1/lib/python2.6/site-packages/numpy/distutils/ccompiler.py",
> > line 7, in <module>
> > from distutils.ccompiler import *
> > File
> > "/share/dizou/local/numpy-1.5.1/lib/python2.6/site-packages/numpy/distutils/__init__.py",
> > line 7, in <module>
> > import ccompiler
> > File
> > "/share/dizou/local/numpy-1.5.1/lib/python2.6/site-packages/numpy/distutils/ccompiler.py",
> > line 8, in <module>
> > from distutils import ccompiler
> > ImportError: cannot import name ccompiler
> > When I do 'which gcc' at the terminal window I get: /usr/bin/gcc
> > How do I fix this?
> 
> This error is really strange. Could you quickly try this from your 
> terminal ?
> 
> python -c "from distutils import ccompiler"
> 
> If this does not work, there is something wrong with your setup (what is 
> your PYTHONPATH ?), or your python install is seriously broken (but you 
> would not have been able to install numpy that way, so I suspect the 
> configuration problem to be more likely),
> 
> cheers,
> 
> David
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
> 
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

---
Travis Oliphant
Enthought, Inc.
oliphant at enthought.com
1-512-536-1057
http://www.enthought.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20101029/0549eed3/attachment.html>


More information about the SciPy-User mailing list