Chatterbox-TTS-Server icon indicating copy to clipboard operation
Chatterbox-TTS-Server copied to clipboard

Installation fails due to ONNX build requirements - requirements.txt doesn't install completely

Open Innomen opened this issue 1 year ago • 6 comments

Installation fails due to ONNX build requirements - requirements.txt doesn't install completely System Info

OS: Garuda Linux x86_64 (Arch-based) Python: 3.11.6 Shell: fish 4.0.2 CPU: Intel Core Ultra 9 185H GPU: Intel Arc Graphics (Integrated)

Issue Description The pip install -r requirements.txt command fails during installation due to ONNX build requirements, leaving many dependencies uninstalled. This results in a cascade of ModuleNotFoundError exceptions when trying to run python server.py, requiring manual installation of missing packages one by one. Error Details The installation fails with: CMake Error at CMakeLists.txt:2 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. And then: subprocess.CalledProcessError: Command '['/usr/bin/cmake', ...]' returned non-zero exit status 1. ERROR: Failed building wheel for onnx Reproduction Steps

Fresh python3 -m venv venv && source venv/bin/activate pip install -r requirements.txt Installation fails at ONNX build step python server.py results in missing module errors (yaml, chatterbox, etc.) Had to manually install packages: pip install PyYAML chatterbox-tts fastapi uvicorn etc.

Impact This creates a poor first-time user experience and requires manual troubleshooting that isn't documented. Suggested Solutions

Add cmake to system requirements in README Consider using --only-binary=all flag in installation instructions Add troubleshooting section for common build failures Maybe split requirements.txt into core vs optional dependencies

Additional Notes

Once manually installed, the server works great! This is just trying to help improve the setup experience Issue discovered and documented with AI assistance (being low-effort here 😅)

Thanks for the awesome project! 🎤

Innomen avatar Jul 24 '25 02:07 Innomen

I'm having the same issue, and could not fix it, any directions? By "--only-binary=all" you mean like this "pip install onnx==1.16.0 --only-binary=all"?

Luigi-Fergos avatar Jul 30 '25 19:07 Luigi-Fergos

(another low effort ai reply, just paste this thread and your terminal outputs to claude, that's how i do 99% of this crap XD, beware loss of answer formatting in this comment compared to ai page with code boxes and stuff)

Hey Luigi! I can help you with this ONNX installation issue. The problem is that ONNX is trying to build from source and failing due to CMake version compatibility issues on your Arch-based system. Here are a few solutions to try, in order of preference: Solution 1: Force Binary Installation Yes, you're on the right track with the --only-binary=all flag, but apply it to the entire requirements installation: bashpip install -r requirements.txt --only-binary=all If that still fails, try installing ONNX specifically with a binary wheel first: bashpip install onnx --only-binary=all pip install -r requirements.txt Solution 2: Install System Dependencies Since you're on Garuda Linux (Arch-based), install the required build tools: bashsudo pacman -S cmake base-devel Then try the installation again: bashpip install -r requirements.txt Solution 3: Use conda instead of pip ONNX tends to have fewer build issues with conda: bash# If you have conda/miniconda installed conda install onnx pip install -r requirements.txt Solution 4: Skip ONNX temporarily If ONNX isn't critical for your immediate use case, you could:

Comment out the ONNX line in requirements.txt Install the rest: pip install -r requirements.txt Install ONNX later when you specifically need it

Solution 5: Manual workaround Install the core dependencies manually (as the original poster did): bashpip install PyYAML chatterbox-tts fastapi uvicorn torch torchaudio

Add other packages as needed when you get ModuleNotFoundError

Try Solution 1 first - the --only-binary=all flag should force pip to use pre-compiled wheels instead of trying to build from source, which should avoid the CMake issues entirely.

Innomen avatar Jul 30 '25 20:07 Innomen

Had this problem on windows, solution was to downgrade cmake to 3.31.8 and python to 3.10.10 and make a new virtual environment. Really annoying that this wasn't instructed, unless my original installation had something wrong with it.

Xytheur avatar Aug 02 '25 07:08 Xytheur

Had this problem on windows, solution was to downgrade cmake to 3.31.8 and python to 3.10.10 and make a new virtual environment. Really annoying that this wasn't instructed, unless my original installation had something wrong with it.

Can confirm. I set up a conda environment using python 3.10.10, installed cmake 3.31.8, git cloned, and the requirements-nvidia.txt installed fine. linux mint 22.2 with nvidia

Salty124u avatar Sep 23 '25 09:09 Salty124u

Fixed in commit a67348a. The root cause was that chatterbox-tts pulled in s3tokenizer which depends on onnx, and pip would try to build ONNX from source on platforms without pre-built wheels — failing due to CMake/compiler issues.

The fix:

  • Chatterbox is now installed with --no-deps across all installation paths (CPU, NVIDIA, cu128, ROCm)
  • All chatterbox dependencies are listed explicitly in the requirements files
  • onnx==1.16.0 is pinned to ensure pre-built wheels are used (no source builds)

To update: git pull && python start.py --reinstall

If you still hit issues, make sure you're using Python 3.10 (recommended). Python 3.13+ is not supported.

devnen avatar Mar 26 '26 22:03 devnen

Closing as a duplicate of #113, fixed in a67348a. Chatterbox is now installed with --no-deps everywhere and onnx==1.16.0 is pinned to a wheel build, so ONNX no longer tries to compile from source. After git pull && python start.py --reinstall (or a fresh Docker build) it should install cleanly.

devnen avatar May 11 '26 14:05 devnen