myshell-ai / MeloTTS

High-quality multi-lingual text-to-speech library by MyShell.ai. Support English, Spanish, French, Chinese, Japanese and Korean.
MIT License
4.81k stars 627 forks source link

Failed building wheel for mecab-python-3 #126

Open ahmetkca opened 6 months ago

ahmetkca commented 6 months ago

pip install git+https://github.com/myshell-ai/MeloTTS.git

Using cached pyasn1-0.6.0-py2.py3-none-any.whl (85 kB)
Building wheels for collected packages: melotts, mecab-python3
  Building wheel for melotts (pyproject.toml) ... done
  Created wheel for melotts: filename=melotts-0.1.2-py3-none-any.whl size=4781468 sha256=1e9a76c68a940c6564bccdf3af1e52e015a13c595fbd88993380b4cd227c4b89
  Stored in directory: /private/var/folders/sd/1qqtvw_d5njfp8q160741rwh0000gn/T/pip-ephem-wheel-cache-flo09z9w/wheels/b6/d2/78/26bf7fc1f891a51b695fbbb89990265b48ad0ba91910a8b016
  Building wheel for mecab-python3 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for mecab-python3 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-14.4-arm64-cpython-39
      creating build/lib.macosx-14.4-arm64-cpython-39/MeCab
      copying src/MeCab/__init__.py -> build/lib.macosx-14.4-arm64-cpython-39/MeCab
      copying src/MeCab/cli.py -> build/lib.macosx-14.4-arm64-cpython-39/MeCab
      running build_ext
      error: [Errno 2] No such file or directory: 'mecab-config'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mecab-python3
Successfully built melotts
Failed to build mecab-python3
ERROR: Could not build wheels for mecab-python3, which is required to install pyproject.toml-based projects

MacBook M3 Max 16" Apple Silicon MacOSX 14.4.1 (23E224)

eschmidbauer commented 6 months ago

i think this is an issue with python>=3.11 if you install mecab-python3==1.0.6 it seems to work

JabariHolder commented 6 months ago

Had the same issue. I'm running on a throw-away docker container so I would not recommend the below as the best solution.

M1 Max 14.4 - Python 3.11 - Ubuntu 20.04 Docker using X86 (AMD64)

The below worked for me (you will have to opt for brew mecab instead): apt install mecab libmecab-dev

For me, mecab-python3 was installed automatically during the setup as per instructions: pip install git+https://github.com/myshell-ai/MeloTTS.git

Also (Docker only) if you don't have gcc installed, for some strange reason installing build-essential was the only way to get it to find GCC: apt install build-essential

WouterGlorieux commented 6 months ago

For a docker container, you have to install MeloTTS after you create the conda environment with python 3.9, then it should work, does take a really long time to build.

chldong commented 6 months ago

brew mecab is ok

jaketothepast commented 6 months ago

@ahmetkca run brew install mecab first. I have identical specs to you, and had the same issue and that fixed it.