question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

failed when load librosa

See original GitHub issue

BEFORE POSTING A BUG REPORT Please look through existing issues (both open and closed) to see if it’s already been reported or fixed!

Describe the bug When I debug the codes, I could import librosa. The bug appears when I try to run the script.

To Reproduce

Screenshots

  File "./noise.py", line 14, in <module>
    import librosa
  File "/miniconda3/envs/th/lib/python3.8/site-packages/librosa/__init__.py", line 209, in <module>
    from . import core
  File "/miniconda3/envs/th/lib/python3.8/site-packages/librosa/core/__init__.py", line 5, in <module>
    from .convert import *  # pylint: disable=wildcard-import
  File "/miniconda3/envs/th/lib/python3.8/site-packages/librosa/core/convert.py", line 7, in <module>
    from . import notation
  File "/miniconda3/envs/th/lib/python3.8/site-packages/librosa/core/notation.py", line 8, in <module>
    from ..util.exceptions import ParameterError
  File "/miniconda3/envs/th/lib/python3.8/site-packages/librosa/util/__init__.py", line 77, in <module>
    from .utils import *  # pylint: disable=wildcard-import
  File "/miniconda3/envs/th/lib/python3.8/site-packages/librosa/util/utils.py", line 9, in <module>
    import numba
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/__init__.py", line 211, in <module>
    import numba.typed
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/typed/__init__.py", line 1, in <module>
    from .typeddict import Dict
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/typed/typeddict.py", line 23, in <module>
    def _make_dict(keyty, valty):
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/decorators.py", line 260, in njit
    return jit(*args, **kws)
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/decorators.py", line 183, in jit
    return wrapper(pyfunc)
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/decorators.py", line 210, in wrapper
    disp = dispatcher(py_func=func, locals=locals,
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/dispatcher.py", line 777, in __init__
    self.targetctx = self.targetdescr.target_context
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/registry.py", line 47, in target_context
    return self._toplevel_target_context
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/utils.py", line 277, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/registry.py", line 31, in _toplevel_target_context
    return cpu.CPUContext(self.typing_context)
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/base.py", line 260, in __init__
    self.init()
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/compiler_lock.py", line 35, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/cpu.py", line 47, in init
    self._internal_codegen = codegen.JITCPUCodegen("numba.exec")
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/codegen.py", line 1100, in __init__
    self._init(self._llvm_module)
  File "/miniconda3/envs/th/lib/python3.8/site-packages/numba/core/codegen.py", line 1105, in _init
    target = ll.Target.from_triple(ll.get_process_triple())
  File "/miniconda3/envs/th/lib/python3.8/site-packages/llvmlite/binding/targets.py", line 197, in from_triple
    raise RuntimeError(str(outerr))
RuntimeError: Unable to find target for this triple (no targets are registered)

Software versions*

>>> import platform; print(platform.platform())
Linux-5.11.0-37-generic-x86_64-with-glibc2.10
>>> import sys; print("Python", sys.version)
Python 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:59:51)
[GCC 9.4.0]
>>> import numpy; print("NumPy", numpy.__version__)
NumPy 1.21.3
>>> import scipy; print("SciPy", scipy.__version__)
SciPy 1.7.1
>>> import librosa; print("librosa", librosa.__version__)
librosa 0.9.1

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mhh0318commented, Jun 15, 2022

@mhh0318 is this still an issue for you? If so, would you mind trying to upgrade / reinstall llvmlite in your conda environment?

I’ve done a bit of googling, and the only other places I’m seeing this particular error show up are llvm-related (far upstream of us).

I also think it should be llvm-related problems. After change the env, This problem no longer exists. Thanks for your follow-up.

0reactions
bmcfeecommented, Jun 12, 2022

@mhh0318 is this still an issue for you? If so, would you mind trying to upgrade / reinstall llvmlite in your conda environment?

I’ve done a bit of googling, and the only other places I’m seeing this particular error show up are llvm-related (far upstream of us).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error with librosa.load() · Issue #536 - GitHub
Whenever I try to load any audiofile with librosa I get the following error: Python 3.4.3 (default, Nov 17 2016, 01:08:31) [GCC 4.8.4]...
Read more >
librosa.load: file not found error on loading a file - Stack Overflow
Two things: It looks like you are using Homebrew; avconv is not in your path. Assuming, you have never installed it, you should...
Read more >
Troubleshooting — librosa 0.10.0.dev0 documentation
If you're loading an audio file, and see the following message: UserWarning: PySoundFile failed. Trying audioread instead. Do not worry. This is a...
Read more >
Librosa not loading mp3 files from dataset. - Reddit
I am working on genre classifying model. An issue I am encountering is librosa is not loading the mp3 file. I am getting...
Read more >
Error importing librosa - Google Groups
I was using librosa without any problem until yesterday when i tried to import it ... ImportError: DLL load failed: The specified module...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found