Text-to-Speech
ONNX
Safetensors

Pip install fails in CosyVoice environment setup.

#18
by dongxianzhe - opened

I followed the installation instructions for CosyVoice with the following commands:

conda create -n cosyvoice -y python=3.10
conda activate cosyvoice
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com

However, the pip install step fails with errors related to pkg_resources.

It seems to be caused by compatibility issues between Python 3.10, setuptools, and the build dependencies in the requirements.

Could you provide guidance on how to correctly set up the environment for Python 3.10?

Collecting openai-whisper==20231117 (from -r requirements.txt (line 25))
  Using cached https://mirrors.aliyun.com/pypi/packages/d2/6e/50ace2bf704e5ffc786d20d96403ab0d57c5d6ab8729de7fed8c436687df/openai-whisper-20231117.tar.gz (798 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 "/data/home/xianzhedong/anaconda3/envs/cosyvoice/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/data/home/xianzhedong/anaconda3/envs/cosyvoice/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
        File "/data/home/xianzhedong/anaconda3/envs/cosyvoice/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/data/tmp/pip-build-env-1ndi7z84/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "/data/tmp/pip-build-env-1ndi7z84/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
          self.run_setup()
        File "/data/tmp/pip-build-env-1ndi7z84/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 520, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/data/tmp/pip-build-env-1ndi7z84/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 5, in <module>
      ModuleNotFoundError: No module named 'pkg_resources'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed to build 'openai-whisper' when getting requirements to build wheel

Sign up or log in to comment