using the stats package in scipy error in Python?

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/", line 7, in <module>
    from stats import *
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/", line 202, in <module>
    import scipy.special as special
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/", line 8, in <module>
    from basic import *
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/", line 6, in <module>
    from _cephes import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/, 2): Symbol not found: _aswfa_
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/

Any idea what could be happening here?



The message is saying that aswfa (angular spheroidal wave function ?) is missing in the 0.9.0-dev scipy special/ runtime library. (It's there in 0.7.2, nm -gpv special/ | 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.

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.

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

just ran into the same problem and ended up on this page. What I'd done: Install scipy without previously installing numpy. After installing numpy and reinstalling scipy, everything worked.

Need Your Help

Store users hashed PW in localstorage?

javascript web-applications authentication

I'm writing a web app for 100 users where I work. It is accessible on the internet, not just our intranet. Many users are unskilled users, though most use Chrome as that's the browser that's defaul...

MySQL - Best method of saving and loading items

mysql loading save

So on my older work, I had always used the 'text' data type to store items, like so: