[Bug]: Clean install cannot import audio_separator — ModuleNotFoundError: No module named 'audioread' (undeclared dependency)

Aperta Adatta ai principianti
#325 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
95/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
build-system

Direzione di ricerca

Inizia da pyproject.toml, dove sono dichiarate le dipendenze di runtime, e controlla gli import in audio_separator/separator/uvr_lib_v5/spec_utils.py e audio_separator/separator/architectures/vr_separator.py. Dichiara esplicitamente audioread, quindi verifica in un ambiente pulito usando pip install --ignore-installed . seguito da python -c "import audio_separator". Il lavoro è completato quando una nuova installazione risolve audioread e l’import avviene senza ModuleNotFoundError.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

  • I have searched and found no existing issues.

Describe the bug

A clean install of audio-separator==0.48.0 cannot be imported at all:

ModuleNotFoundError: No module named 'audioread'

audioread is imported and used at runtime, but it is not declared as a dependency. It used to arrive transitively through librosa, and librosa 1.0 dropped it, so the librosa>=0.10 constraint no longer guarantees its presence.

I confirmed this without installing anything, by resolving a fresh install:

$ pip install --dry-run --ignore-installed --report resolve.json "audio-separator==0.48.0"
$ python -c "import json;d=json.load(open('resolve.json'));p={i['metadata']['name'].lower():i['metadata']['version'] for i in d['install']};print(p.get('librosa'), 'audioread' in p)"
1.0.1 False

So the default resolution today picks librosa 1.0.1 and installs no audioread — the package is broken out of the box, no upgrade step needed.

It is not a dead import

audioread is really used, so removing the import is not the right fix:

  • audio_separator/separator/uvr_lib_v5/spec_utils.py:1 — import audioread, used at line 1332: with audioread.audio_open(audio_file) as f:
  • audio_separator/separator/architectures/vr_separator.py:12 — import audioread, used at line 397

The import chain that triggers it first:

separator/separator.py:27   from audio_separator.separator.ensembler import Ensembler
separator/ensembler.py:3    from audio_separator.separator.uvr_lib_v5 import spec_utils
uvr_lib_v5/spec_utils.py:1  import audioread
Workaround
pip install audioread

After that, import and separation both work normally (verified on 4-stem separation).

Suggested fix

Add it explicitly to dependencies in pyproject.toml, e.g. audioread>=3.0. Because librosa>=1.0 no longer provides it, relying on the transitive path will break for every new install from now on.

Logs

Traceback (most recent call last):
  File "/path/to/site-packages/audio_separator/separator/separator.py", line 27, in <module>
    from audio_separator.separator.ensembler import Ensembler
  File "/path/to/site-packages/audio_separator/separator/ensembler.py", line 3, in <module>
    from audio_separator.separator.uvr_lib_v5 import spec_utils
  File "/path/to/site-packages/audio_separator/separator/uvr_lib_v5/spec_utils.py", line 1, in <module>
    import audioread
ModuleNotFoundError: No module named 'audioread'

Package metadata for 0.48.0 shows no audioread requirement anywhere, including extras:

$ python -c "import importlib.metadata as m;print([r for r in m.requires('audio-separator') if 'audio' in r.lower()])"
['audioop-lts (>=0.2.1) ; python_version >= "3.13" and python_version < "4.0"']

System Info

Operating System: macOS 26.6.2 (arm64, Apple Silicon)
Python version:   3.14.6
audio-separator:  0.48.0 (latest on PyPI, released 2026-10-29)
librosa:          1.0.1
numpy:            2.5.5
torch:            2.15.0 (darwin arm64 wheel)
Install method:   pip in a virtualenv, as a dependency of a desktop app

Additional Information

Found while installing a third-party app that depends on audio-separator[cpu]; the failure is in this package's own dependency metadata, so it should affect any consumer, not just that app.

If 3.14 support is a concern, note requires_python currently allows 3.14.x (!=3.14.1,>=3.10) — but this failure is unrelated to the Python version, it is the missing dependency.

Happy to test a patch release.

Lingua principale
Python
Stelle
1.5k
Fork
216
Merge medio
1h
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nomadkaraoke/python-audio-separator

Tutte le issue di nomadkaraoke/python-audio-separator

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.