erew123 / alltalk_tts

AllTalk is based on the Coqui TTS engine, similar to the Coqui_tts extension for Text generation webUI, however supports a variety of advanced features, such as a settings page, low VRAM support, DeepSpeed, narrator, model finetuning, custom models, wav file maintenance. It can also be used with 3rd Party software via JSON calls.
GNU Affero General Public License v3.0
944 stars 110 forks source link

Macbook Pro M3 Max Install Issue: Cythonizing spacy/kb.pyx #205

Closed brianragle closed 5 months ago

brianragle commented 5 months ago

🔴 Diagnostic report could not be generated This is a 4 day old MBP with a fresh install of Python, with all other relevant updates applied.

Describe the bug text-generation-webui installed without issue. Followed steps on Alltalk page up to this one:

pip install -r system/requirements/requirements_textgen.txt

Consistently errors out (see below)

To Reproduce Run "pip install -r system/requirements/requirements_textgen.txt"

Text/logs [ 2/41] Cythonizing spacy/kb.pyx Traceback (most recent call last): File "/Users/brianragle/Documents/TextGen/text-generation-webui/installer_files/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/Users/brianragle/Documents/TextGen/text-generation-webui/installer_files/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(*hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/brianragle/Documents/TextGen/text-generation-webui/installer_files/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/vs/r77xwd5136q3gy3m_nncg_1h0000gn/T/pip-build-env-nop3b6d2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/vs/r77xwd5136q3gy3m_nncg_1h0000gn/T/pip-build-env-nop3b6d2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/private/var/folders/vs/r77xwd5136q3gy3m_nncg_1h0000gn/T/pip-build-env-nop3b6d2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 224, in File "", line 211, in setup_package File "/private/var/folders/vs/r77xwd5136q3gy3m_nncg_1h0000gn/T/pip-build-env-nop3b6d2/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize cythonize_one(args) File "/private/var/folders/vs/r77xwd5136q3gy3m_nncg_1h0000gn/T/pip-build-env-nop3b6d2/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: spacy/kb.pyx [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.

Desktop (please complete the following information): AllTalk was updated:NA Custom Python environment: No Text-generation-webUI was updated: 2024May06

erew123 commented 5 months ago

Hi @brianragle

Investigation/Research

This is a difficult one for me to help/advise upon as I don't have a mac, let alone a ARM based one. However, I have done what research I can on this and found that:

as far as I am aware people have installed both the Coqui TTS engine on x86 based macs and I believe ARM based macs. e.g https://github.com/coqui-ai/TTS/discussions/2177


Possible things to try

My best thought at this point in time would be to open your terminal on your mac and go into the text-gen-webui folder and start the Python environment with cmd_macos.sh

From there you can type pip show cython to confirm what version of Cython is installed. I cant say exactly what versions do or don't work. What I can say is that I started AllTalk when Cython 3.0.6 was the current build and Cython 3.0.10 is the current build as of March 2024. So I would assume that versions in that region would work, but that is an assumption.

If possible, I would try to get your text-gen-webui Python environment on Cython 3.0.10

If its on Cython 3.0.10 (or at least 3.0.6) I would manually try installing Spacy, which again is, text-gen-webui folder and start the Python environment with cmd_macos.sh then pip install spacy and see if that installs/compiles.

If Spacy installs/compiles, then re-try the AllTalk setup by installing the requirements. If it doesn't, then its probably something for Spacy to look into, though they would need to know what version of Cython you have installed on your machine. They would have to figure out why Spacy isnt compiling on the version of Cython you have installed and guide you as to how to resolve it.

If I had a ARM based mac, I would happily go to them, but I would be unable to test anything or give them further information based on anything they ask/suggest.


Updated requirements for Text-gen-webui

The only other thing I have done in all of this is to install a fresh install of Text-gen-webui on my machine (in Windows I admit) however, I did notice that when installing the TTS engine PIP was hunting around trying to find a copy of Spacy to install. I think it went through 10+ attempts at finding a version and I gave up at that point as it was taking maybe 5 minutes per attempt.

What I've done is to add Spacy to the requirements file and nailed it to versions greater than 3.7.2 (which is over 6 months old) which will at least stop it hunting around for multiple versions. This commit is here https://github.com/erew123/alltalk_tts/commit/6808439ca103cb076851cbfb45e28801587a1bd8

I would suggest you git pull AllTalk down before you attempt to reinstall its requirements.

Ill close the ticket for now, but you are welcome to come back to me if you wish.

Thanks