coqui-ai / TTS

🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production
http://coqui.ai
Mozilla Public License 2.0
35.08k stars 4.28k forks source link

[Bug] Can't install TTS - gets stalled in Collecting trainer>=0.0.32, Using cached trainer-0.0.35-py3-none-any.whl (51 kB) #4009

Closed tpo closed 3 weeks ago

tpo commented 3 weeks ago

Describe the bug

When I do:

~/.local/python-venvs/TTS/bin/pip install TTS

it takes an eternity to download and install everything (like 3h or such) and then it gets stuck at:

Collecting transformers>=4.33.0
  Using cached transformers-4.33.2-py3-none-any.whl (7.6 MB)
  Using cached transformers-4.33.1-py3-none-any.whl (7.6 MB)
  Using cached transformers-4.33.0-py3-none-any.whl (7.6 MB)
INFO: pip is looking at multiple versions of trainer to determine which version is compatible with other requirements. This could take a while.
Collecting trainer>=0.0.32
  Using cached trainer-0.0.35-py3-none-any.whl (51 kB)

Stuck means that I have waited for 2h for anything to happen and nothing else happens from that point on.

pip is using 100% CPU. When I strace the process I see:

$ strace -ff -p `pgrep pip`
openat(AT_FDCWD, "/home/MYUSER/.local/python-venvs/TTS/lib/python3.11/site-packages/setuptools-66.1.1.dist-info/METADATA", O_RDONLY|O_CLOEXEC) = 4
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=6213, ...}, AT_EMPTY_PATH) = 0
ioctl(4, TCGETS, 0x7ffc9be65d00)        = -1 ENOTTY (Unpassender IOCTL (I/O-Control) für das Gerät)
lseek(4, 0, SEEK_CUR)                   = 0
lseek(4, 0, SEEK_CUR)                   = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=6213, ...}, AT_EMPTY_PATH) = 0
read(4, "Metadata-Version: 2.1\nName: setu"..., 6214) = 6213
read(4, "", 1)                          = 0
close(4)                                = 0
openat(AT_FDCWD, "/home/MYUSER/.local/python-venvs/TTS/lib/python3.11/site-packages/setuptools-66.1.1.dist-info/METADATA", O_RDONLY|O_CLOEXEC) = 4
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=6213, ...}, AT_EMPTY_PATH) = 0
ioctl(4, TCGETS, 0x7ffc9be65d00)        = -1 ENOTTY (Unpassender IOCTL (I/O-Control) für das Gerät)
lseek(4, 0, SEEK_CUR)                   = 0
lseek(4, 0, SEEK_CUR)                   = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=6213, ...}, AT_EMPTY_PATH) = 0
read(4, "Metadata-Version: 2.1\nName: setu"..., 6214) = 6213
read(4, "", 1)                          = 0
close(4)                                = 0
openat(AT_FDCWD, "/home/MYUSER/.local/python-venvs/TTS/lib/python3.11/site-packages/setuptools-66.1.1.dist-info/METADATA", O_RDONLY|O_CLOEXEC) = 4
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=6213, ...}, AT_EMPTY_PATH) = 0
ioctl(4, TCGETS, 0x7ffc9be65d00)        = -1 ENOTTY (Unpassender IOCTL (I/O-Control) für das Gerät)
lseek(4, 0, SEEK_CUR)                   = 0
lseek(4, 0, SEEK_CUR)                   = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=6213, ...}, AT_EMPTY_PATH) = 0
read(4, "Metadata-Version: 2.1\nName: setu"..., 6214) = 6213
read(4, "", 1)                          = 0
close(4)                                = 0
openat(AT_FDCWD, "/home/MYUSER/.local/python-venvs/TTS/lib/python3.11/site-packages/setuptools-66.1.1.dist-info/METADATA", O_RDONLY|O_CLOEXEC) = 4
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=6213, ...}, AT_EMPTY_PATH) = 0
ioctl(4, TCGETS, 0x7ffc9be65d00)        = -1 ENOTTY (Unpassender IOCTL (I/O-Control) für das Gerät)
lseek(4, 0, SEEK_CUR)                   = 0
lseek(4, 0, SEEK_CUR)                   = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=6213, ...}, AT_EMPTY_PATH) = 0
read(4, "Metadata-Version: 2.1\nName: setu"..., 6214) = 6213
read(4, "", 1)                          = 0
close(4)                                = 0

Keeps scrolling and scrolling and nothing else is happening.

$ ~/.local/python-venvs/TTS/bin/python3 --version
Python 3.11.2

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

To Reproduce

~/.local/python-venvs/TTS/bin/pip install TTS

Expected behavior

The installation process terminates at some point... but it doesn't. See above.

Logs

Which logs?

Environment

# TTS PyTorch, CUDA/cuDNN versions:

I guess it's not entirely installed, that's why the following fails...:

$ source /home/MYUSER/.local/python-venvs/TTS//bin/activate
(TTS) MYUSER@MYMACHINE:~$ python /home/MYUSER/.local/python-venvs/TTS/bin/collect_env_info.py
Traceback (most recent call last):
  File "/home/MYUSER/.local/python-venvs/TTS/bin/collect_env_info.py", line 6, in <module>
    import numpy
ModuleNotFoundError: No module named 'numpy'
$ source ~/.local/python-venvs/TTS//bin/activate
$ pip list 
Package    Version
---------- -------
pip        23.0.1
setuptools 66.1.1
$ ./pip cache list
Cache contents:

 - htmlmin-0.1.12-py3-none-any.whl (27 kB)
 - sh-1.14.3-py2.py3-none-any.whl (39 kB)

I wonder why the packages and wheels that should get installed via:

~/.local/python-venvs/TTS/bin/pip install TTS

... do not show up here?

Python Version

$ ~/.local/python-venvs/TTS/bin/python --version
Python 3.11.2

OS

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

GPU

none

$ lshw
[...]
             description: VGA compatible controller
             product: TigerLake-LP GT2 [Iris Xe Graphics]
             vendor: Intel Corporation

How I installed PyTorch

I did not. I did:

~/.local/python-venvs/TTS/bin/pip install TTS

and that's it.



### Additional context

_No response_
eginhard commented 3 weeks ago

Try our fork with pip install coqui-tts, this repo is not updated anymore. It works better with recent versions of packages and also has fewer mandatory dependencies.

tpo commented 3 weeks ago

Try our fork with pip install coqui-tts, this repo is not updated anymore. It works better with recent versions of packages and also has fewer mandatory dependencies.

Thanks a lot @eginhard!!! I will.

I walked this trail because I was looking for a TTS, went to https://huggingface.co/ -> Models -> Audio -> Text-to-Speech, clicked on the first one, "coqui/XTTS-v2", clicked on Documentation -> "Tutorial for nervous beginners, which says:

$ pip install TTS

Are the instructions at https://docs.coqui.ai/ still maintained, resp. can the be refreshed by the community or can the hugging coqui docu page be refreshed to finaly point to pip install coqui-tts?

tpo commented 3 weeks ago

see https://github.com/coqui-ai/TTS/issues/4009#issuecomment-2396278586

tpo commented 3 weeks ago

Try our fork with pip install coqui-tts, this repo is not updated anymore. It works better with recent versions of packages and also has fewer mandatory dependencies.

Installation ran through like a charm and tts works, yay! Thank you @eginhard !

eginhard commented 3 weeks ago

Are the instructions at https://docs.coqui.ai/ still maintained, resp. can the be refreshed by the community or can the hugging coqui docu page be refreshed to finaly point to pip install coqui-tts?

The documentation for the fork is found here and can be updated by the community (in the same Github repo): https://coqui-tts.readthedocs.io/en/latest/ Many places still link to the old repo/docs, but updating those is usually out of my control...

tpo commented 3 weeks ago

The documentation for the fork is found here and can be updated by the community (in the same Github repo): https://coqui-tts.readthedocs.io/en/latest/ Many places still link to the old repo/docs, but updating those is usually out of my control...

Thank you @eginhard