[Bug]: Clean install cannot import audio_separator — ModuleNotFoundError: No module named 'audioread' (undeclared dependency)
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 95/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- build-system
调研方向
从 pyproject.toml 开始,其中声明了运行时依赖项,并检查 audio_separator/separator/uvr_lib_v5/spec_utils.py 和 audio_separator/separator/architectures/vr_separator.py 中的导入。明确声明 audioread,然后在干净的环境中运行 pip install --ignore-installed .,接着运行 python -c "import audio_separator" 进行验证。全新安装能够解析 audioread 且导入时没有 ModuleNotFoundError,即视为完成。
由索引模型根据 Issue 内容生成。
描述
- 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.
- 主要语言
- Python
- 星标
- 1.5k
- 派生
- 216
- 平均合并
- 1 小时
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nomadkaraoke/python-audio-separator 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 68/100
nomadkaraoke/python-audio-separator#292 · 2 条评论 ·
-
Confusing info in README可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 1/5 1 小时以内 新手友好度 65/100
nomadkaraoke/python-audio-separator#246 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
-
[Bug]: MDX models: vocals scaled down by the input's peak when the input peak is below normalization_threshold , leaving voice in the instrumental stem可能已有人在做 @Rahul-cs50 于 24 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 65/100
查看 nomadkaraoke/python-audio-separator 的全部 Issue
相似的 Issue
-
request_access
难度 1/5 1 小时以内 新手友好度 75/100
-
blocker bug
难度 2/5 1-3 小时 新手友好度 76/100
achisolomon/software-factory#305 ·
-
难度 2/5 1-3 小时 新手友好度 92/100
erkamyaman/rust-anything#963 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
commonmark/commonmark-spec#850 ·
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 78/100