错误:pip 依赖项安装的子进程退出并出现错误

问题描述 投票:0回答:1

我正在构建一个视频生成自动化项目,我正在尝试使用 openai-whisper 来生成字幕。其他依赖项是:

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

当我尝试运行命令时

pip3 install openai-whisper
我在终端上得到以下输出

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.

下面是代码的存储库。如果我提供的内容不够充分,您可以检查所有内容。 https://github.com/kashsuks/redditStories

我尝试安装其他包如pytest,看看是否是pip内部问题,pytest安装成功。

规格:

  • 在虚拟环境中运行
  • 点24.3.1

如果还有什么需要了解的,欢迎评论

pip automation dependencies openai-whisper
1个回答
0
投票

openai-whisper 20240930的设置信息说:

我们使用Python 3.9.9和PyTorch 1.10.1来训练和测试我们的模型,但代码库预计与Python 3.8-3.11和最新的PyTorch版本兼容。代码库还依赖于一些 Python 包,最引人注目的是 OpenAI 的 tiktoken 的快速标记器实现。

您使用的是 Python 3.13,正如信息所示,尚不支持该版本。此包使用 Python 3.11。您可以创建一个 python 3.11 虚拟环境并将此包安装到该环境中。

© www.soinside.com 2019 - 2024. All rights reserved.