搭建本地vits

搭建本地vits遇见的报错pyopenjtalk-0.3.0.tar.gz

  • 报错信息
  • 解决方案

报错信息

Collecting pyopenjtalk
  Using cached pyopenjtalk-0.3.0.tar.gz (1.5 MB)
  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
  ╰─> [25 lines of output]
      setup.py:26: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        _CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
      Traceback (most recent call last):
        File "C:\ProgramData\miniforge3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in 
          main()
        File "C:\ProgramData\miniforge3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\ProgramData\miniforge3\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 162, in get_requires_for_build_wheel
          return self._get_build_requires(
        File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in _get_build_requires
          self.run_setup()
        File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 267, in run_setup
          super(_BuildMetaLegacyBackend,
        File "C:\Users\re\AppData\Local\Temp\pip-build-env-a_tp6_20\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 153, in 
        File "C:\ProgramData\miniforge3\lib\subprocess.py", line 503, in run
          with Popen(*popenargs, **kwargs) as process:
        File "C:\ProgramData\miniforge3\lib\subprocess.py", line 971, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "C:\ProgramData\miniforge3\lib\subprocess.py", line 1440, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      [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.

解决方案

根据git教程跑到添加python依赖文件时遇到的上述报错,错误的原因主要是因为加载pyopenjtalk-0.3.0.tar.gz时需要依赖的库文件,如果没有库文件会有上述的报错 链接: pyopenjtalk官方库依赖

搭建本地vits_第1张图片
看上图所示的红框,我们在安装pyopenjtalk-0.3.0.tar.gz时需要准备好c/c++、cmake以及cython的库才能安装pythonjtalk

cmd中输入指令

pip install cmake
pip install cython

如果有上述的库会直接提示已经有过安装以及安装的版本

最后需要吧cmake添加到环境变量的path中,根据自己安装的环境进行配置我的目录是

D:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin

添加到环境变量中即可解决 如果是开虚拟环境的话需要把虚拟环境卸载重新cmd开一下虚拟环境,如下是我配好环境的本地服务
搭建本地vits_第2张图片
希望能帮助要各位小伙伴 如果需要可以留言

你可能感兴趣的:(智能工具类目,前端,linux,运维,vits)