TTS
TTS copied to clipboard
[Bug] unable to install tts on mac m1
Describe the bug
when i close repo and run command make install it throws error and Failed building wheel for mecab-python3
To Reproduce
- close the repo
- run the command "make install"
Expected behavior
it should successfully install all packages and the service is accessible through command line
Logs
ERROR: Command errored out with exit status 1:
command: /Users/kundanshrivastava/miniconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/57/p20g78bs5tv__bdbhbtm7glh0000gn/T/pip-install-fd6dkpg9/mecab-python3_f34232987540474c840fbe831b795cdc/setup.py'"'"'; __file__='"'"'/private/var/folders/57/p20g78bs5tv__bdbhbtm7glh0000gn/T/pip-install-fd6dkpg9/mecab-python3_f34232987540474c840fbe831b795cdc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/57/p20g78bs5tv__bdbhbtm7glh0000gn/T/pip-wheel-u3gs_1w3
cwd: /private/var/folders/57/p20g78bs5tv__bdbhbtm7glh0000gn/T/pip-install-fd6dkpg9/mecab-python3_f34232987540474c840fbe831b795cdc/
Complete output (12 lines):
/Users/kundanshrivastava/miniconda3/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11.1-arm64-3.9
creating build/lib.macosx-11.1-arm64-3.9/MeCab
copying src/MeCab/__init__.py -> build/lib.macosx-11.1-arm64-3.9/MeCab
copying src/MeCab/cli.py -> build/lib.macosx-11.1-arm64-3.9/MeCab
running build_ext
error: [Errno 2] No such file or directory: 'mecab-config'
----------------------------------------
ERROR: Failed building wheel for mecab-python3
Environment
{
"CUDA": {
"GPU": [],
"available": false,
"version": null
},
"Packages": {
"PyTorch_debug": false,
"PyTorch_version": "1.12.1",
"TTS": "0.8.0",
"numpy": "1.21.6"
},
"System": {
"OS": "Darwin",
"architecture": [
"64bit",
""
],
"processor": "arm",
"python": "3.9.12",
"version": "Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000"
}
}
Additional context
No response
We don't support M1 systems as we stated in the README.md, we support linux ATM. But can you check whether it installs when you remove mecab-python3
from requirements.txt
If it works maybe we can ignore it when installing on M1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.
See also https://github.com/coqui-ai/TTS/issues/1533#issuecomment-1313159949
@erogol following your suggestion to remove mecab-python3 from requirements.txt,
this throws the error mecab not found
:
tts --text "Text for TTS" --out_path output/path/speech.wav
I understand this is because the default models include mecab but how can we make it run then?
@kundanshrivastava I was able to make the whole installation work with the following:
# install arm64 dependency before installing mecab-python3
arch -arm64e /opt/homebrew/bin/brew install mecab
# install dependency python
mamba install python=3.10
Nevertheless, there is a new issue that I filed as bug.
Hey, I'm the mecab-python3
maintainer. I am unable to provide M1 wheels because mecab-python3
needs to compile native extensions and I have no M1 hardware and Github Actions doesn't provide a build env I can use.
I don't really know anything about this package, but it seems like it's not focused on Japanese. If most of your users don't need MeCab, it would be best if you configure it as an extra dependency instead of including it by default, so that users who don't need it to just ignore it.
If you need a reference for how to lazy-load a module and warn about it, look at how spaCy handles Japanese imports.
Hey, I'm the
mecab-python3
maintainer. I am unable to provide M1 wheels becausemecab-python3
needs to compile native extensions and I have no M1 hardware and Github Actions doesn't provide a build env I can use.I don't really know anything about this package, but it seems like it's not focused on Japanese. If most of your users don't need MeCab, it would be best if you configure it as an extra dependency instead of including it by default, so that users who don't need it to just ignore it.
@kundanshrivastava @erogol I totally agree with @polm, I think it would be better for most users do remove the MeCab dependency from the default models. Do you think that is possible to implement in the near future?
In due time yes but probably not in the near future.
I was able to install it using brew mecab.
You can also now run the Docker container on latest Docker Desktop (4.16+) with Rosetta for x86/amd64 emulation enabled (disable containerd for pulling images):
docker run --rm -it -p 5002:5002 --platform linux/amd64 --entrypoint /bin/bash ghcr.io/coqui-ai/tts-cpu
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.
on M2 mac and with conda I was able to install TTS dev branch.
on M2 mac and with conda I was able to install TTS dev branch.
Can you explain more? What did you do to install that branch with conda?
git checkout dev pip install -e .
can install successfully but when trying to synthesis it gives the following bus error on a m1 mac
zsh: bus error tts --text "xxx" --model_path "checkpoint_50000.pth"
I'm on an M1 mac mini and a simple brew install mecab
just helped me install TTS successfully.
I'm also on m1 mac and brew install mecab made TTS installation work. That, plus pinning to Python 3.10.11.
I close this issue. I was able to install on M1 a couple of times with no issue.s