Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can anyone help me install nussl please? Issue with soxbindings requirement.. #233

Open
rt60ltd opened this issue Oct 18, 2022 · 6 comments
Labels

Comments

@rt60ltd
Copy link

rt60ltd commented Oct 18, 2022

Hi, I'm trying to install nussl on Mac with no success. The page just says run 'pip install nussl' but doesn't give any troubleshooting advice if that doesn't complete... I'm running Python 3.10 and have other packages including scipy, soundfile, ffmpeg, sox and librosa working fine in projects.

The error seems to be associated with soxbindings, with the following messages:

python setup.py bdist_wheel did not run successfully
Failed building wheel for soxbindings
Running setup.py install for soxbindings did not run successfully

I've searched and searched for clues on how to fix, but with no success. Any help on how to troubleshoot and resolve this would be very much appreciated.

@ethman
Copy link
Collaborator

ethman commented Oct 19, 2022

This might be more relevant to the soxbindings repo, but: do you have sox installed on your machine?

@gkostin1966
Copy link

(venv) ➜  nussel2 source /Users/gkostin/PycharmProjects/nussel2/venv/bin/activate
pip install nussl
Collecting nussl
  Using cached nussl-1.1.9-py2.py3-none-any.whl (239 kB)
Requirement already satisfied: torch in ./venv/lib/python3.9/site-packages (from nussl) (1.13.0)
Requirement already satisfied: tqdm in ./venv/lib/python3.9/site-packages (from nussl) (4.64.1)
...
...
...
Requirement already satisfied: oauthlib>=3.0.0 in ./venv/lib/python3.9/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard->nussl) (3.2.2)
Building wheels for collected packages: soxbindings
  Building wheel for soxbindings (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      /Users/gkostin/PycharmProjects/nussel2/venv/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-3.9
      creating build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/effects.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/__init__.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/sox_cli.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/transform.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/audio.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      running build_ext
      creating var
      creating var/folders
      creating var/folders/kh
      creating var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr
      creating var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Users/gkostin/PycharmProjects/nussel2/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/tmpm7gb2ekl.cpp -o var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/tmpm7gb2ekl.o -std=c++17
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Users/gkostin/PycharmProjects/nussel2/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/tmpngxavk5m.cpp -o var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/tmpngxavk5m.o -fvisibility=hidden
      creating build/temp.macosx-10.9-universal2-3.9
      creating build/temp.macosx-10.9-universal2-3.9/soxbindings
      creating build/temp.macosx-10.9-universal2-3.9/soxbindings/ext
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -DVERSION_INFO=\"1.2.3\" -I/private/var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/pip-install-u7gf1ynt/soxbindings_e4781c6034b14cb6835cf36b130e57b5/.eggs/pybind11-2.10.1-py3.9.egg/pybind11/include -I/Users/gkostin/PycharmProjects/nussel2/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c soxbindings/ext/sox.cpp -o build/temp.macosx-10.9-universal2-3.9/soxbindings/ext/sox.o -stdlib=libc++ -mmacosx-version-min=10.7 -lsox -std=c++17 -fvisibility=hidden
      clang: warning: -lsox: 'linker' input unused [-Wunused-command-line-argument]
      soxbindings/ext/sox.cpp:4:10: fatal error: 'sox.h' file not found
      #include <sox.h>
               ^~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for soxbindings
  Running setup.py clean for soxbindings
Failed to build soxbindings
Installing collected packages: ffmpy, importlib-resources, soxbindings, pytorch-ignite, pyloudnorm, norbert, matplotlib, librosa, jams, gpytorch, museval, nussl
  Running setup.py install for soxbindings ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for soxbindings did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      /Users/gkostin/PycharmProjects/nussel2/venv/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      /Users/gkostin/PycharmProjects/nussel2/venv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-3.9
      creating build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/effects.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/__init__.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/sox_cli.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/transform.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      copying soxbindings/audio.py -> build/lib.macosx-10.9-universal2-3.9/soxbindings
      running build_ext
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Users/gkostin/PycharmProjects/nussel2/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/tmpcokkzs3u.cpp -o var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/tmpcokkzs3u.o -std=c++17
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Users/gkostin/PycharmProjects/nussel2/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/tmp5azo775j.cpp -o var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/tmp5azo775j.o -fvisibility=hidden
      creating build/temp.macosx-10.9-universal2-3.9
      creating build/temp.macosx-10.9-universal2-3.9/soxbindings
      creating build/temp.macosx-10.9-universal2-3.9/soxbindings/ext
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -DVERSION_INFO=\"1.2.3\" -I/private/var/folders/kh/6bbjxnws6h3gwlxmxjnmrmxr0000gr/T/pip-install-u7gf1ynt/soxbindings_e4781c6034b14cb6835cf36b130e57b5/.eggs/pybind11-2.10.1-py3.9.egg/pybind11/include -I/Users/gkostin/PycharmProjects/nussel2/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c soxbindings/ext/sox.cpp -o build/temp.macosx-10.9-universal2-3.9/soxbindings/ext/sox.o -stdlib=libc++ -mmacosx-version-min=10.7 -lsox -std=c++17 -fvisibility=hidden
      clang: warning: -lsox: 'linker' input unused [-Wunused-command-line-argument]
      soxbindings/ext/sox.cpp:4:10: fatal error: 'sox.h' file not found
      #include <sox.h>
               ^~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> soxbindings

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

@gkostin1966
Copy link

gkostin1966 commented Dec 7, 2022

Relavent Soxbindings Issue

pseeth/soxbindings#10

@gkostin1966
Copy link

Was able to get nussl to install by creating symbolic links for sox.h and libsox.a

ln -s /opt/homebrew/include/sox.h /usr/local/include/sox.h
ln -s /opt/homebrew/lib/libsox.a /usr/local/lib/libsox.a

Development Environment Highlights

Apple M1 Pro chip running Ventura 13.0.1
Homebrew brew install python sox libsoxr
PyCharm 2022.3 (Community Edition) IDE

Hope it helps.

@iftrush
Copy link

iftrush commented Oct 12, 2023

I used the method provided by gkostin1966 to install the nussl and it succeeded, but when I try to import nussl, it doesn't work.
ModuleNotFoundError: No module named 'nussl'

@RayyanMasood
Copy link

I used the method provided by gkostin1966 to install the nussl and it succeeded, but when I try to import nussl, it doesn't work. ModuleNotFoundError: No module named 'nussl'

Did you find a way to fix the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants