views:

127

answers:

2

I am trying to read a *.wav file using scipy. I do it in the following way:

import scipy.io
x = scipy.io.wavfile.read('/usr/share/sounds/purple/receive.wav')

As a result I get the following error message:

Traceback (most recent call last):
  File "test3.py", line 1, in <module>
    import scipy.io
  File "/usr/lib/python2.5/site-packages/scipy/io/__init__.py", line 23, in <module>
    from numpy.testing import NumpyTest
ImportError: cannot import name NumpyTest

Does anybody know why scipy cannot import NumpyTest and how it can be fixed?

A: 

Do you have numpy installed? The package is most likely called numpy or python-numpy if you are running Linux

If your OS package manager does not have numpy package, download it from here

Kimvais
I have numpy (version 1.4.0). For example "import numpy" causes no problems.
Roman
A: 

Looks like you have upgraded your numpy version but haven't installed a corresponding scipy version.

Alok