GPT-SoVITS icon indicating copy to clipboard operation
GPT-SoVITS copied to clipboard

求助:window平台clone源码使用pip install -r requirements.txt报错

Open broadth opened this issue 11 months ago • 3 comments

这该如何应对? 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 ╰─> [44 lines of output] setup.py:26: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. _CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver) -- Building for: NMake Makefiles CMake Deprecation Warning at CMakeLists.txt:5 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  CMake Error at CMakeLists.txt:17 (project):
    Running

     'nmake' '-?'

    failed with:

     绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆\x82


  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
  -- Configuring incomplete, errors occurred!
  CMake is in the system path. Version:               cmake version 3.28.3

  CMake suite maintained and supported by Kitware (kitware.com/cmake).
  Traceback (most recent call last):
    File "D:\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "D:\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "D:\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\18485\AppData\Local\Temp\pip-build-env-sca372l7\overlay\Lib\site-packages\setuptools\build_meta.py", line 162, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "C:\Users\18485\AppData\Local\Temp\pip-build-env-sca372l7\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in _get_build_requires
      self.run_setup()
    File "C:\Users\18485\AppData\Local\Temp\pip-build-env-sca372l7\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 191, in <module>
    File "D:\Python\Python310\lib\subprocess.py", line 457, in check_returncode
      raise CalledProcessError(self.returncode, self.args, self.stdout,
  subprocess.CalledProcessError: Command '['cmake', '..', '-DHTS_ENGINE_INCLUDE_DIR=.', '-DHTS_ENGINE_LIB=dummy']' returned non-zero exit status 1.
  [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.

image

broadth avatar Feb 27 '24 11:02 broadth

检查cmake相关环境

KamioRinn avatar Feb 27 '24 14:02 KamioRinn

有挺多解决办法 1、参考这个要先装vs2017一些组件的方法 https://blog.csdn.net/weixin_42033112/article/details/133427964 2、嫌麻烦的话,可以去github里面的prezip下整合包,把runtime-Lib-site-packages里面对应的文件夹直接拷过去,那个是已经编译好的

RVC-Boss avatar Feb 28 '24 04:02 RVC-Boss

感谢诸位的帮助,此问题现已解决。 特别感谢RVC-Boss大佬提供的解决办法,行之有效。现将我的解决步骤罗列一下,以期能给后面踩了同样坑的人以帮助:

1、安装Visual Studio Enterprise 2017。

参照上面RVC-Boss大佬提供的博客地址和步骤安装Visual Studio Enterprise 2017。软件地址:博客 如果找不到下载地址,就选择加入免费 Dev Essentials 计划。这样就能下载了 image

2、配置环境变量。

配置cmake环境变量:Enterprise安装地址\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin 配置MSVC环境变量:Enterprise安装地址\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64 其他 做完上面的两步就可以解决这个问题了。最后命令行执行一下安装命令就完事了: pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

broadth avatar Feb 28 '24 07:02 broadth