安装OpenAI Jukebox时numba、llvmlite编译wheel错误求助
解决Jukebox在Colab安装时numba/llvmlite编译失败的问题
问题重现
执行!pip install git+https://github.com/openai/jukebox.git时出现编译错误:
note: This error originates from a subprocess, and is likely not a problem with pip.
Building wheel for llvmlite (setup.py) ... error
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Successfully built jukebox fire librosa mpi4py
Failed to build numba llvmlite
ERROR: Could not build wheels for numba, llvmlite, which is required to install pyproject.toml-based projects
解决方案
问题出在llvmlite和numba需要本地编译,而Colab环境缺少对应的LLVM依赖或版本不兼容,直接安装预编译的wheel包即可解决:
- 卸载现有冲突版本
!pip uninstall -y numba llvmlite
- 安装兼容的预编译版本(版本匹配,无需编译)
!pip install numba==0.56.4 llvmlite==0.39.1
- 再次安装Jukebox
!pip install git+https://github.com/openai/jukebox.git
说明
llvmlite的编译依赖完整的LLVM开发环境,Colab默认配置未预装这些组件,指定兼容的预编译版本可以跳过本地编译步骤,直接完成安装。
内容的提问来源于stack exchange,提问作者xelov
相关产品推荐
相关产品推荐

