ImportError: cannot import name NumpyTest
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>
f开发者_如何转开发rom numpy.testing import NumpyTest
ImportError: cannot import name NumpyTest
Does anybody know why scipy cannot import NumpyTest and how it can be fixed?
Looks like you have upgraded your numpy version but haven't installed a corresponding scipy version.
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
精彩评论