pipautomationdependenciesopenai-whisper

error: subprocess-exited-with-error for pip dependencies installation


I'm building a video generation automation project and I'm trying to use openai-whisper for the subtitle generation. Other dependencies are:

#File for dependencies
requests == 2.32.3
gTTS == 2.5.3
openai-whisper == 20240930

When i try to run the command pip3 install openai-whisper I get the following output to the terminal

pip3 install openai-whisper                                                                             ─╯
Collecting openai-whisper
  Downloading openai-whisper-20240930.tar.gz (800 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 800.5/800.5 kB 10.2 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
  ╰─> [25 lines of output]
      <string>:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Traceback (most recent call last):
        File "/Users/ksukshavasi/redditStories/.venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
          ~~~~^^
        File "/Users/ksukshavasi/redditStories/.venv/lib/python3.13/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/ksukshavasi/redditStories/.venv/lib/python3.13/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/4c/kcl8fxts5w33ljgzkm5jlwww0000gn/T/pip-build-env-rqz9lofh/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/4c/kcl8fxts5w33ljgzkm5jlwww0000gn/T/pip-build-env-rqz9lofh/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 303, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "/private/var/folders/4c/kcl8fxts5w33ljgzkm5jlwww0000gn/T/pip-build-env-rqz9lofh/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 521, in run_setup
          super().run_setup(setup_script=setup_script)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/4c/kcl8fxts5w33ljgzkm5jlwww0000gn/T/pip-build-env-rqz9lofh/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 319, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 21, in <module>
        File "<string>", line 11, in read_version
      KeyError: '__version__'
      [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.

Below is the repo for the code. You can check all of it in case what I've provided is insufficient. https://github.com/kashsuks/redditStories

I tried to install other packages such as pytest to see if it was an internal problem with pip, and pytest successfully installed.

Specifications:

If there is anything else you would need to know, please feel free to comment


Solution

  • The setup information for openai-whisper 20240930 says:

    We used Python 3.9.9 and PyTorch 1.10.1 to train and test our models, but the codebase is expected to be compatible with Python 3.8-3.11 and recent PyTorch versions. The codebase also depends on a few Python packages, most notably OpenAI's tiktoken for their fast tokenizer implementation.

    You are using Python 3.13 and just as the information indicates, there's no support yet for that version. Use Python 3.11 for this package. You can create a python 3.11 virtual environment and install this package into that environment.