Nuitka: Error finding soundfile path on arm64
Hi!
trying to compile librosa on arm64 (mac 14.1) With python 3.10. and the following packages (shortended):
audioread==3.0.1
lameenc==1.6.3
librosa==0.10.1
Nuitka==1.9.1
numba==0.58.1
numpy==1.26.2
PyAudio==0.2.14
pydub==0.25.1
PySide6-Essentials==6.6.0
scikit-learn==1.3.2
scipy==1.11.4
shiboken6==6.6.0
soundfile==0.12.1
Version:
1.9.1
Commercial: None
Python: 3.10.11 (v3.10.11:7d4cc5aa85, Apr 4 2023, 19:05:19) [Clang 13.0.0 (clang-1300.0.29.30)]
Flavor: CPython Official
Executable: /Users/bklronin/Development/venv_11/bin/python
OS: Darwin
Arch: arm64
Version C compiler: /usr/bin/clang (clang 15.0.0).
Settings:
# nuitka-project: --plugin-enable=pyside6
# nuitka-project: --plugin-enable=numpy
# nuitka-project: --include-package=mido
# nuitka-project: --include-package=librosa
# nuitka-project: --follow-imports
# nuitka-project: --noinclude-numba-mode=nofollow
# nuitka-project: --standalone
# nuitka-project: --macos-create-app-bundle
# nuitka-project: --include-data-files=devices.yaml=devices.yaml
# nuitka-project: --include-data-files=config.yaml=config.yaml
# nuitka-project: --include-data-files=sampler_presets.yaml=sampler_presets.yaml
Commandline:
python -m nuitka --standalone --macos-create-app-bundle app.py in env
Error: Appears with all python versions from 3.9 to 3.11
Nuitka-Inclusion:INFO: Not including forbidden DLL '/Users/bklronin/Development/venv_11/lib/python3.10/site-packages/PySide6/Qt/plugins/imageformats/libqpdf.dylib'.
FATAL: Error, failed to find path @rpath/libsndfile.1.dylib (resolved DLL to /Users/bklronin/Development/venv_11/lib/python3.10/site-packages/_soundfile_data/libsndfile.1.dylib) for /Users/bklronin/Development/venv_11/lib/python3.10/site-packages/_soundfile_data/libsndfile_arm64.dylib from 'soundfile', please report the bug.
Full output:
Nuitka-Options:INFO: Used command line options: --plugin-enable=pyside6 --plugin-enable=numpy --include-package=mido --include-package=librosa --follow-imports --noinclude-numba-mode=nofollow --standalone --macos-create-app-bundle --include-data-files=devices.yaml=devices.yaml --include-data-files=config.yaml=config.yaml --include-data-files=sampler_presets.yaml=sampler_presets.yaml --standalone --macos-create-app-bundle ubridge-pro.py
Nuitka-Options:INFO: Following all imports is the default for standalone mode and need not be specified.
Nuitka-Plugins:WARNING: numpy: This plugin has been deprecated, do not enable it anymore.
Nuitka:INFO: Starting Python compilation with Nuitka '1.9.1' on Python '3.10' commercial grade 'not installed'.
Nuitka-Plugins:INFO: options-nanny: Note, when using 'PySide6', consider using '--disable-console' option. Otherwise high resolution will not be available and a terminal window will open. Howeverfor debugging, terminal output is the easiest way to see informative traceback and error information, so delay this until your program working and remove once you find it non-working, and use '--enable-console' to make it explicit and not see this message.
Nuitka-Plugins:INFO: anti-bloat: Not including '_bisect' automatically in order to avoid bloat, but this may cause: may slow down by using fallback implementation.
Nuitka-Plugins:INFO: anti-bloat: Not including '_json' automatically in order to avoid bloat, but this may cause: may slow down by using fallback implementation.
Nuitka:INFO: Completed Python level compilation and optimization.
Nuitka:INFO: Generating source code for C backend compiler.
Nuitka:INFO: Running data composer tool for optimal constant value handling.
Nuitka:INFO: Running C compilation via Scons.
Nuitka-Scons:INFO: Backend C compiler: clang (clang 15.0.0).
Nuitka-Scons:INFO: Backend linking program with 983 files (no progress information available for this stage).
Nuitka-Scons:INFO: Compiled 983 C files using ccache.
Nuitka-Scons:INFO: Cached C files (using ccache) with result 'cache miss': 983
Nuitka-Options:INFO: Included data file 'devices.yaml' due to specified data file 'devices.yaml=devices.yaml' on command line.
Nuitka-Options:INFO: Included data file 'config.yaml' due to specified data file 'config.yaml=config.yaml' on command line.
Nuitka-Options:INFO: Included data file 'sampler_presets.yaml' due to specified data file 'sampler_presets.yaml=sampler_presets.yaml' on command line.
Nuitka-Plugins:INFO: data-files: Included data file 'certifi/cacert.pem' due to package data for 'certifi'.
Nuitka-Plugins:INFO: data-files: Included data file 'librosa/core/intervals.msgpack' due to package data for 'librosa.core.intervals'.
Nuitka-Plugins:INFO: pyside6: Including Qt plugins 'iconengines,imageformats,platforms,styles,tls' below 'PySide6/qt-plugins'.
Nuitka-Plugins:INFO: dll-files: Found 1 file DLLs from soundfile installation.
Nuitka-Inclusion:INFO: Not including forbidden DLL '/Users/bklronin/Development/venv_11/lib/python3.10/site-packages/PySide6/Qt/plugins/imageformats/libqpdf.dylib'.
FATAL: Error, failed to find path @rpath/libsndfile.1.dylib (resolved DLL to /Users/bklronin/Development/venv_11/lib/python3.10/site-packages/_soundfile_data/libsndfile.1.dylib) for /Users/bklronin/Development/venv_11/lib/python3.10/site-packages/_soundfile_data/libsndfile_arm64.dylib from 'soundfile', please report the bug.
EDIT:
The error when I not avoid numba:
Nuitka-Options:INFO: Used command line options: --plugin-enable=pyside6 --plugin-enable=numpy --include-package=mido --include-package=librosa --include-package=soundfile --noinclude-numba-mode=error --standalone --macos-create-app-bundle --include-data-files=devices.yaml=devices.yaml --include-data-files=config.yaml=config.yaml --include-data-files=sampler_presets.yaml=sampler_presets.yaml --disable-console ubridge-pro.py
Nuitka:WARNING: For GUI applications, you ought to specify an icon with '--macos-app-icon'.", otherwise a dock icon may not be present.
Nuitka-Plugins:WARNING: numpy: This plugin has been deprecated, do not enable it anymore.
Nuitka:INFO: Starting Python compilation with Nuitka '1.9.1' on Python '3.10' commercial grade 'not installed'.
FATAL: Error, forbidden import of 'numba' (intending to avoid 'numba') in module 'librosa.util.utils' at '/Users/bklronin/Development/venv_11/lib/python3.10/site-packages/librosa/util/utils.py:11' encountered.
Can“t get around, seems a bigger problem. Probably kicking out librosa.
About this issue
- Original URL
- State: open
- Created 7 months ago
- Comments: 18 (6 by maintainers)
Hi!
You can copy and rename the
libsndfile_arm64.dylibtolibsndfile.1.dylibas a workaround. In the same folder.