Failed to build `pkuseg==0.0.25`
uv add numpy
Resolved 53 packages in 36ms
Audited 51 packages in 0.07ms
➜ tts-service git:(dev) ✗ uv add chatterbox-tts
Resolved 130 packages in 54ms
× Failed to build pkuseg==0.0.25
├─▶ The build backend returned an error
╰─▶ Call to setuptools.build_meta:__legacy__.build_wheel failed (exit status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/rey/.cache/uv/builds-v0/.tmpVljTGN/lib/python3.11/site-packages/setuptools/build_meta.py", line 331, in
get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rey/.cache/uv/builds-v0/.tmpVljTGN/lib/python3.11/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
self.run_setup()
File "/Users/rey/.cache/uv/builds-v0/.tmpVljTGN/lib/python3.11/site-packages/setuptools/build_meta.py", line 512, in run_setup
super().run_setup(setup_script=setup_script)
File "/Users/rey/.cache/uv/builds-v0/.tmpVljTGN/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals())
File "<string>", line 5, in <module>
ModuleNotFoundError: No module named 'numpy'
hint: This usually indicates a problem with the package or the build environment.
help: If you want to add the package regardless of the failed resolution, provide the --frozen flag to skip locking and syncing.
my numpy version (like in chatterbox pyproject.toml): dependencies = [ "numpy>=1.26.0", ]
update: error only on 0.1.3 chatterbox-tts version
0.1.4 too:
pip install chatterbox-tts
Collecting chatterbox-tts
Using cached chatterbox_tts-0.1.4-py3-none-any.whl.metadata (9.2 kB)
Collecting numpy<1.26.0,>=1.24.0 (from chatterbox-tts)
Using cached numpy-1.25.2-cp311-cp311-win_amd64.whl.metadata (5.7 kB)
Collecting librosa==0.11.0 (from chatterbox-tts)
Using cached librosa-0.11.0-py3-none-any.whl.metadata (8.7 kB)
Collecting s3tokenizer (from chatterbox-tts)
Using cached s3tokenizer-0.2.0.tar.gz (225 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting torch==2.6.0 (from chatterbox-tts)
Using cached torch-2.6.0-cp311-cp311-win_amd64.whl.metadata (28 kB)
Collecting torchaudio==2.6.0 (from chatterbox-tts)
Using cached torchaudio-2.6.0-cp311-cp311-win_amd64.whl.metadata (6.7 kB) 01:30Collecting transformers==4.46.3 (from chatterbox-tts)
Using cached transformers-4.46.3-py3-none-any.whl.metadata (44 kB)
Collecting diffusers==0.29.0 (from chatterbox-tts)
Using cached diffusers-0.29.0-py3-none-any.whl.metadata (19 kB)
Collecting resemble-perth==1.0.1 (from chatterbox-tts)
Using cached resemble_perth-1.0.1-py3-none-any.whl.metadata (4.8 kB)
Collecting conformer==0.3.2 (from chatterbox-tts)
Using cached conformer-0.3.2-py3-none-any.whl.metadata (631 bytes)
Collecting safetensors==0.5.3 (from chatterbox-tts)
Using cached safetensors-0.5.3-cp38-abi3-win_amd64.whl.metadata (3.9 kB)
Collecting pkuseg==0.0.25 (from chatterbox-tts)
Using cached pkuseg-0.0.25.tar.gz (48.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
File "<string>", line 5, in <module>
ModuleNotFoundError: No module named 'numpy'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
I'm working in Python virtual environment with Python version 3.11.13. I solved something similar with:
pip install -U pip setuptools wheel
pip install "numpy>=1.24,<1.26"
pip install --no-build-isolation "pkuseg==0.0.25"
pip install chatterbox-tts
upgrading wheel and setuptools helped
pip install wheel setuptools --upgrade
But it must be documented (or added requerements.txt)
spacy_pkuseg works
or you can delete it from .toml if you dont care about Chinese language support
spacy_pkuseg works
How so? No matter what I do whenever I try to install chatterbox-tts it tries to install pkuseg alongside it as well. And that install causes errors with numpy. I've tried everything listed here but nothing has worked so far.
I have been facing similar issue. I believe the its mostly due to the uv environment.
The pkused seems to be only supported with Python 3.8.20
The pkused seems to be only supported with Python 3.8.20
Not surprising for 5+ year old project that is no longer maintained, but you really should not use 3.8 in 2025.
So?
I followed this installation video using another fork and I dun see that error anymore
https://youtu.be/IQLmZH9Wpso?si=yvkIGZjnCyb_FP7H
I'm working in Python virtual environment with Python version 3.11.13. I solved something similar with:
pip install -U pip setuptools wheel pip install "numpy>=1.24,<1.26" pip install --no-build-isolation "pkuseg==0.0.25" pip install chatterbox-tts
On the 3rd step I faced with "Python.h: file not found" error, fixed by installing python3.11-dev package.