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.

New installations of librosa break with numba 0.50.0

See original GitHub issue

Describe the bug

Numba has had a new release (0.50.0) which breaks new installations of librosa. Importing librosa now returns:

  File "/site-packages/librosa/util/decorators.py", line 9, in <module>
    from numba.decorators import jit as optional_jit
ModuleNotFoundError: No module named 'numba.decorators'

To Reproduce

python -m venv venv
source venv/bin/activate
pip install librosa
python -c "import librosa"

Edit:

This was the warning message before the update:

/site-packages/librosa/util/decorators.py:9: NumbaDeprecationWarning:
An import was requested from a module that has moved location.
Import requested from: 'numba.decorators', please update to use 'numba.core.decorators'
or pin to Numba version 0.48.0. This alias will not be present in Numba version 0.50.0.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
JulianFerrycommented, Jun 15, 2020

Hi, sorry about the duplicate! I missed the closed issues. Isn’t it a bit strange to force the user to install the correct requirements themselves? Can’t this just be set in the requirements for the package?

If all dependencies strictly adhered to semantic versioning, then yes, that would work. The problem here is that numba introduced an API-breaking change with a relatively short deprecation cycle (less than 2 months!), and they don’t generally adhere to semantic versioning (neither do we), so it would be impossible to anticipate this kind of thing by pinning to version numbers. They have significantly more developer time and resources than we do, and we were not able to put out a release before the change took effect.

So I suppose my request/suggestion is to release a 0.7.3 with this bugfix soon

Thanks for the suggestion. At this point, we’re pretty close to the 0.8.0 release, and will just go for that rather than roll back changes to put out a point release for this issue.

Okay makes sense. I massively appreciate the detail you put in your responses by the way.

2reactions
bmcfeecommented, Jun 13, 2020

Hi, sorry about the duplicate! I missed the closed issues. Isn’t it a bit strange to force the user to install the correct requirements themselves? Can’t this just be set in the requirements for the package?

If all dependencies strictly adhered to semantic versioning, then yes, that would work. The problem here is that numba introduced an API-breaking change with a relatively short deprecation cycle (less than 2 months!), and they don’t generally adhere to semantic versioning (neither do we), so it would be impossible to anticipate this kind of thing by pinning to version numbers. They have significantly more developer time and resources than we do, and we were not able to put out a release before the change took effect.

So I suppose my request/suggestion is to release a 0.7.3 with this bugfix soon

Thanks for the suggestion. At this point, we’re pretty close to the 0.8.0 release, and will just go for that rather than roll back changes to put out a point release for this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Librosa won't load with numba>=0.50 · Issue #1158 - GitHub
Setup a fresh environment Python 3.8, and pip install librosa, and just try to import librosa. Numba just released version 0.50.0: ...
Read more >
Installation — Numba 0.50.1 documentation
The easiest way to install Numba and get updates is by using conda , a ... To enable CUDA GPU support for Numba,...
Read more >
Unable to pip install librosa in raspberry pi 3 model b+ ...
I had this issue myself when installing librosa recently on a Raspberry Pi. Despite the numba issue, let's start with a few basics...
Read more >
Changelog — librosa 0.9.2 documentation
A detailed list of changes is provided below. New Features. #1130 Nearly full support for multi-channel processing. Brian McFee, Daniel Faronbi, Iran Roman....
Read more >
numba/numba - Gitter
I installed numba==0.50.0 used pip3 install numba, but in python3, it shows numba version == 0.34.0. 8 replies ... Hi everyone, happy new...
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