[2noise/ChatTTS]conda install -c conda-forge pynini=2.1.5 && pip install WeTextProcessing

2024-06-06 482 views
9

运行 conda install -c conda-forge pynini=2.1.5 && pip install WeTextProcessing 报以下错误 Channels:

  • conda-forge
  • defaults Platform: osx-arm64 Collecting package metadata (repodata.json): done Solving environment: done
All requested packages already installed.

Collecting WeTextProcessing Using cached WeTextProcessing-0.1.12-py3-none-any.whl.metadata (5.2 kB) Collecting pynini==2.1.5 (from WeTextProcessing) Using cached pynini-2.1.5.tar.gz (627 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] Traceback (most recent call last): File "/Users/sy/learn/python/ChatTTS/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/Users/sy/learn/python/ChatTTS/venv/lib/python3.10/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/sy/learn/python/ChatTTS/venv/lib/python3.10/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/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/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/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/private/var/folders/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup super().run_setup(setup_script=setup_script) File "/private/var/folders/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 22, in ModuleNotFoundError: No module named 'Cython' [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. │ exit code: 1 ╰─> See above for output.

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

回答

9

我咋看下来你这是安装环境的问题呢

8

执行的这几行命令 python3.10 -m venv venv source venv/bin/activate pip install -r requirements.txt

0

运行 conda install -c conda-forge pynini=2.1.5 && pip install WeTextProcessing 报以下错误 Channels:

  • conda-forge
  • defaults Platform: osx-arm64 Collecting package metadata (repodata.json): done Solving environment: done
All requested packages already installed.

Collecting WeTextProcessing Using cached WeTextProcessing-0.1.12-py3-none-any.whl.metadata (5.2 kB) Collecting pynini==2.1.5 (from WeTextProcessing) Using cached pynini-2.1.5.tar.gz (627 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] Traceback (most recent call last): File "/Users/sy/learn/python/ChatTTS/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/Users/sy/learn/python/ChatTTS/venv/lib/python3.10/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/sy/learn/python/ChatTTS/venv/lib/python3.10/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/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/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/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/private/var/folders/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup super().run_setup(setup_script=setup_script) File "/private/var/folders/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 22, in ModuleNotFoundError: No module named 'Cython' [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. │ exit code: 1 ╰─> See above for output.

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

这个是因为缺少Cython,没有办法编译C导致的。pip install cython或conda install Cython.

7

运行 conda install -c conda-forge pynini=2.1.5 && pip install WeTextProcessing 报以下错误 Channels:

  • conda-forge
  • defaults Platform: osx-arm64 Collecting package metadata (repodata.json): done Solving environment: done
All requested packages already installed.

Collecting WeTextProcessing Using cached WeTextProcessing-0.1.12-py3-none-any.whl.metadata (5.2 kB) Collecting pynini==2.1.5 (from WeTextProcessing) Using cached pynini-2.1.5.tar.gz (627 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] Traceback (most recent call last): File "/Users/sy/learn/python/ChatTTS/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/Users/sy/learn/python/ChatTTS/venv/lib/python3.10/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/sy/learn/python/ChatTTS/venv/lib/python3.10/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/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/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/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/private/var/folders/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup super().run_setup(setup_script=setup_script) File "/private/var/folders/72/55z_yr217_722gy2v_kb2db80000gn/T/pip-build-env-likb1m7f/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 22, in ModuleNotFoundError: No module named 'Cython' [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. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.

这个是因为缺少Cython,没有办法编译C导致的。pip install cython或conda install Cython.

安了Cython之后还是报缺这个模块

9

创建环境 conda create -n chattts python=3.x.x 激活环境 conda activate chatts 安装Cython conda install Cython 解下来再执行你的安装命令即可

8

试了一下 这样是可以的