开发者

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/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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜