tutorial icon indicating copy to clipboard operation
tutorial copied to clipboard

AttributeError: module 'scipy.signal' has no attribute 'hamming'

Open DavidWang12345678 opened this issue 1 year ago • 2 comments

When I try to import Nussl, I encounter an error. I’ve checked that my SciPy version is up to date (1.14.1). Has anyone else experienced this problem?

DavidWang12345678 avatar Sep 28 '24 12:09 DavidWang12345678

I just encountered the same problem. I am running scipy 1.15.1.

DrRichardDaystrom avatar Jan 16 '25 23:01 DrRichardDaystrom

I figured out how to get nussl to import on my MacOS 15.2 machine.

First, I had to install the Xcode command line tools (in order to satisfy the C++11 requirement for nussl to build soxbindings).

Next, I had to use Homebrew to install sox (also required for nussl to build soxbindings, sox provides sox.h).

Then, I used conda to build my python environment. In particular, I had to specify 'python=3.6' (because nussl uses the deprecated imp library), 'numpy<2' (because nussl uses the deprecated type np.float_), and 'scipy<1' (because nussl looks for hamming in scipy.signal, rather than scipy.signal.windows).

After my conda environment was built and activated, I need to use pip to install numba==0.48 (because nussl uses numba.decorators). Then, I use pip to install librosa but I am not sure if I needed to since nussl might install in in the next step. Finally, I used pip to install nussl (and then conda to install ipython).

Once that was all done, I could open an ipython session and import nussl without it throwing any errors. I haven't even played with it yet (given that it was such a journey to set up an environment for it). However, I wanted to document my progress somewhere in case it is helpful.

DrRichardDaystrom avatar Jan 17 '25 00:01 DrRichardDaystrom