views:

46

answers:

3

I am trying to use the scipy stats package in Python and am getting the following error (on Mac OS X):

$ python
Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> from scipy import stats

I then get the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy-0.9.0.dev-py2.6-macosx-10.6-universal.egg/scipy/stats/__init__.py", line 7, in <module>
    from stats import *
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy-0.9.0.dev-py2.6-macosx-10.6-universal.egg/scipy/stats/stats.py", line 202, in <module>
    import scipy.special as special
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy-0.9.0.dev-py2.6-macosx-10.6-universal.egg/scipy/special/__init__.py", line 8, in <module>
    from basic import *
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy-0.9.0.dev-py2.6-macosx-10.6-universal.egg/scipy/special/basic.py", line 6, in <module>
    from _cephes import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy-0.9.0.dev-py2.6-macosx-10.6-universal.egg/scipy/special/_cephes.so, 2): Symbol not found: _aswfa_
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy-0.9.0.dev-py2.6-macosx-10.6-universal.egg/scipy/special/_cephes.so
  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy-0.9.0.dev-py2.6-macosx-10.6-universal.egg/scipy/special/_cephes.so

Any idea what could be happening here?

thanks.

+1  A: 

I would recommend using Fink for installing the latest Python and additional packages. Fink's maintainers take care of creating working versions of the programs.

If, for whatever reason, you need to manually install Python packages, make sure to set up environment variables as instructed.

EOL
A: 

You may also try posting to the scipy-user mailing list. Many knowledgeable scipy users/developers read that.

John Salvatier
Another browser is http://groups.google.com/group/scipy-user/topics(you may prefer it, may not.)
Denis
+1  A: 

The message is saying that aswfa (angular spheroidal wave function ?) is missing in the 0.9.0-dev scipy special/_cephes.so runtime library. (It's there in 0.7.2, nm -gpv special/_cephes.so | egrep aswfa. I haven't tried 0.8.0rc1.)

Best wait for experts to fix it. And definitely ask scipy-user or scipy-dev as John Salvatier suggests.

Denis