Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] unable to install tts on mac m1 #2052

Closed
kundanshrivastava opened this issue Oct 6, 2022 · 18 comments
Closed

[Bug] unable to install tts on mac m1 #2052

kundanshrivastava opened this issue Oct 6, 2022 · 18 comments
Labels
bug Something isn't working

Comments

@kundanshrivastava
Copy link

Describe the bug

when i close repo and run command make install it throws error and Failed building wheel for mecab-python3

To Reproduce

  1. close the repo
  2. 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

@kundanshrivastava kundanshrivastava added the bug Something isn't working label Oct 6, 2022
@erogol
Copy link
Member

erogol commented Oct 10, 2022

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

@stale
Copy link

stale bot commented Nov 9, 2022

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.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label Nov 9, 2022
@jeffrafter
Copy link

See also #1533 (comment)

@stale stale bot removed the wontfix This will not be worked on but feel free to help. label Nov 14, 2022
@agilebean
Copy link

@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?

@agilebean
Copy link

@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.

@polm
Copy link
Contributor

polm commented Dec 13, 2022

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.

@agilebean
Copy link

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.

@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?

@erogol
Copy link
Member

erogol commented Jan 4, 2023

In due time yes but probably not in the near future.

@evilc3
Copy link

evilc3 commented Jan 20, 2023

I was able to install it using brew mecab.

@MaxHorstmann
Copy link

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

@stale
Copy link

stale bot commented Mar 22, 2023

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.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label Mar 22, 2023
@erogol
Copy link
Member

erogol commented Mar 23, 2023

on M2 mac and with conda I was able to install TTS dev branch.

@stale stale bot removed the wontfix This will not be worked on but feel free to help. label Mar 23, 2023
@fivestones
Copy link

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?

@erogol
Copy link
Member

erogol commented Apr 3, 2023

git checkout dev
pip install -e .

@pathnirvana
Copy link

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"

@itachiluan
Copy link

I'm on an M1 mac mini and a simple brew install mecab just helped me install TTS successfully.

@aedocw
Copy link

aedocw commented Apr 20, 2023

I'm also on m1 mac and brew install mecab made TTS installation work. That, plus pinning to Python 3.10.11.

@erogol
Copy link
Member

erogol commented Apr 21, 2023

I close this issue. I was able to install on M1 a couple of times with no issue.s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests