RVC-Boss / GPT-SoVITS

1 min voice data can also be used to train a good TTS model! (few shot voice cloning)
MIT License
35.35k stars 4.03k forks source link

I solved the pyopenjtalk _CYTHON_INSTALLED issue in Ubuntu #1131

Open cheneyshen opened 5 months ago

cheneyshen commented 5 months ago

Collecting pyopenjtalk (from -r requirements.txt (line 15))
  Downloading pyopenjtalk-0.3.3.tar.gz (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 24.5 MB/s eta 0:00:00
  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
  ╰─> [31 lines of output]
      setup.py:26: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        _CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
      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: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
      CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
      CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
      -- Configuring incomplete, errors occurred!
      Traceback (most recent call last):
        File "/home/chaohubian/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/chaohubian/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/chaohubian/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-6lcgn2i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
          return self._get_build_requires(
        File "/tmp/pip-build-env-6lcgn2i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 143, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-6lcgn2i8/overlay/lib/python3.9/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 "/home/chaohubian/miniconda3/envs/GPTSoVits/lib/python3.9/subprocess.py", line 460, 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.

I asked ChatGPT, found some hints:

  1. Install CMake and Build Tools: Ensure that CMake and the required build tools are installed on your system. You can install them using the package manager for your OS.

On Ubuntu/Debian: sudo apt-get update sudo apt-get install cmake build-essential

  1. Verify CMake Installation: Make sure CMake is correctly installed and accessible from your command line:

cmake --version

  1. Set CMake Make Program: Sometimes, CMake needs explicit instructions about which build tool to use. You can set the CMAKE_MAKE_PROGRAM variable to point to the make program.

export CMAKE_MAKE_PROGRAM=/usr/bin/make # Adjust the path if necessary

  1. Set Compilers: Ensure that the CC and CXX environment variables point to the correct C and C++ compilers.

export CC=/usr/bin/gcc export CXX=/usr/bin/g++

  1. bash install.sh again, now everything is good. if you have any questions, please contact shenfei2031@gmail.com
Mirakelor commented 3 months ago

It worked Incredibly.