installing librosa on arm architecture

533 views
Skip to first unread message

Sunghoon Kim

unread,
May 19, 2019, 9:55:31 PM5/19/19
to librosa
Hello, I'm using nvidia jetson nano board based on arm architecture.

I asked the nano board manufacturer about installing librosa, but I was told that librosa does not support the ARM platform. (https://devtalk.nvidia.com/default/topic/1051965/jetson-nano/repeating-30-times-/post/5340681/#5340681)

The ARM platform does not support conda, so I'm installing it with pip, and I'm still getting an error.

Is not librosa really working on the ARM platform? I want to know what to do to make it work.

Thank you.

Brian McFee

unread,
May 20, 2019, 3:05:21 PM5/20/19
to librosa
Librosa will work fine, but you may run into problems with some of its dependencies (especially llvmlite).

You may want to consult this thread for details: https://github.com/librosa/librosa/issues/757

Sunghoon Kim

unread,
May 22, 2019, 12:19:24 PM5/22/19
to librosa

Thanks, McFee
I installed librosa 0.6.1 with llvmlite 7.0.1 

However, the following error occurs when import librosa, like Unable to find target for this triple (no targets are registered).
How can I fix it?

Thank you. 
env : ubuntu 18.04, python3.6
---------------------------------------------------------------------------------------------
log
---------------------------------------------------------------------------------------------
shkim at csdl-nano1 in ~ $
→ pip3 install librosa==0.6.1
Collecting librosa==0.6.1
Collecting numpy>=1.8.0 (from librosa==0.6.1)
Collecting scipy>=0.14.0 (from librosa==0.6.1)
Collecting decorator>=3.0.0 (from librosa==0.6.1)
  Using cached https://files.pythonhosted.org/packages/5f/88/0075e461560a1e750a0dcbf77f1d9de775028c37a19a346a6c565a257399/decorator-4.4.0-py2.py3-none-any.whl
Collecting resampy>=0.2.0 (from librosa==0.6.1)
Collecting numba>=0.38.0 (from librosa==0.6.1)
Collecting joblib>=0.7.0 (from librosa==0.6.1)
  Using cached https://files.pythonhosted.org/packages/cd/c1/50a758e8247561e58cb87305b1e90b171b8c767b15b12a1734001f41d356/joblib-0.13.2-py2.py3-none-any.whl
Collecting scikit-learn!=0.19.0,>=0.14.0 (from librosa==0.6.1)
Collecting six>=1.3 (from librosa==0.6.1)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting audioread>=2.0.0 (from librosa==0.6.1)
Collecting llvmlite>=0.28.0dev0 (from numba>=0.38.0->librosa==0.6.1)
Installing collected packages: numpy, scipy, decorator, llvmlite, numba, six, resampy, joblib, scikit-learn, audioread, librosa
Successfully installed audioread-2.1.7 decorator-4.4.0 joblib-0.13.2 librosa-0.6.1 llvmlite-0.28.0 numba-0.43.1 numpy-1.16.3 resampy-0.2.1 scikit-learn-0.21.1 scipy-1.3.0 six-1.12.0

shkim at csdl-nano1 in ~ $
→ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import librosa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/shkim/.local/lib/python3.6/site-packages/librosa/__init__.py", line 12, in <module>
    from . import core
  File "/home/shkim/.local/lib/python3.6/site-packages/librosa/core/__init__.py", line 104, in <module>
    from .time_frequency import *  # pylint: disable=wildcard-import
  File "/home/shkim/.local/lib/python3.6/site-packages/librosa/core/time_frequency.py", line 10, in <module>
    from ..util.exceptions import ParameterError
  File "/home/shkim/.local/lib/python3.6/site-packages/librosa/util/__init__.py", line 69, in <module>
    from .matching import *  # pylint: disable=wildcard-import
  File "/home/shkim/.local/lib/python3.6/site-packages/librosa/util/matching.py", line 16, in <module>
    @numba.jit(nopython=True)
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/decorators.py", line 174, in wrapper
    **dispatcher_args)
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/dispatcher.py", line 541, in __init__
    self.targetctx = self.targetdescr.target_context
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/targets/registry.py", line 50, in target_context
    return self._toplevel_target_context
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/utils.py", line 357, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/targets/registry.py", line 34, in _toplevel_target_context
    return cpu.CPUContext(self.typing_context)
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/targets/base.py", line 250, in __init__
    self.init()
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/targets/cpu.py", line 47, in init
    self._internal_codegen = codegen.JITCPUCodegen("numba.exec")
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/targets/codegen.py", line 608, in __init__
    self._init(self._llvm_module)
  File "/home/shkim/.local/lib/python3.6/site-packages/numba/targets/codegen.py", line 613, in _init
    target = ll.Target.from_triple(ll.get_process_triple())
  File "/home/shkim/.local/lib/python3.6/site-packages/llvmlite/binding/targets.py", line 195, in from_triple
    raise RuntimeError(str(outerr))
RuntimeError: Unable to find target for this triple (no targets are registered)

Mandeep Singh

unread,
Jun 23, 2020, 11:12:54 PM6/23/20
to librosa
Hi Sunghoon,

    I am also running into same issue.
How did you solve it?

Thank you.

Mandeep Singh

unread,
Jun 24, 2020, 12:28:08 AM6/24/20
to librosa
i am installing archiconda3 for aarch64 from below shell script

and then

pip install librosa

Jack Tipper

unread,
Dec 22, 2020, 6:36:33 PM12/22/20
to librosa
This thread was helpful for me, thanks!

Just sharing my experience in case someone else runs into a similar obstacle:
I was attempting to install librosa on a Jetson Nano 2GB, and I ran into issues with numba (and llvmlite), specifically errors with building wheels.

As of today, this specific version worked for me to get librosa up and running on my nano:

$ pip3 install numba==0.48
$ pip3 install librosa

Anything higher than numba 0.48 caused build errors for me.

Valentin Haenel

unread,
Jan 5, 2021, 10:46:29 AM1/5/21
to Jack Tipper, librosa
FWIW: miniforge does support `aarhc64` and should give you a conda on a Jetson:


Best,

V-

--
You received this message because you are subscribed to the Google Groups "librosa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to librosa+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/librosa/e874ffab-03d2-4638-a86e-ef24bedb9e5dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages