在下作業系統為 XP, python 用 2.6.6 版,目前已經安裝了:
numpy-1.6.2-win32-superpack-python2.6.exe
scipy-0.11.0rc1-win32-superpack-python2.6.exe
scikits.audiolab-0.11.0.win32-py2.6.exe
跑以下 code:
from scikits.audiolab import wavread, wavwrite
import scipy
(x, fs, enc)=wavread("test.wav")
y=scipy.fft(x, axis=0)
y[0:0.008*len(y)]=0
y[0.02*len(y):]=0
z=10*scipy.ifft(y, axis=0)
wavwrite(z.astype(scipy.float64), "result.wav", fs, enc)
卻出現:
Traceback (most recent call last):
File "code.py", line 1, in
from scikits.audiolab import wavread, wavwrite
File "C:\Python26\lib\site-packages\scikits\__init__.py", line 1, in
__import__('pkg_resources').declare_namespace(__name__)
ImportError: No module named pkg_resources
請教各位,此問題該如何解決?要安裝新的 module 嗎?
多謝協助!
更新1:
著名一下,"line 1, " 後面有大於小於夾住的 module 文字 知識+會砍語法所以不見了