当前位置:AIGC资讯 > AIGC > 正文

Python Poetry fails to add openai-whisper due to triton installation error

题意:Python Poetry 因 Triton 安装错误而无法添加 openai-whisper。

问题背景:

so im trying to use openai-whisper. i'm using poetry as my env and dependecy manager. but keep getting errors when trying to download it. the error i get is, Installing triton (2.0.0): Failed

i tried the typical poetry add and this is the error

所以我正在尝试使用 openai-whisper。我使用 Poetry 作为我的环境和依赖管理器,但在尝试下载时不断出现错误。遇到的错误是:安装 triton (2.0.0) 失败。

我尝试了常规的 `poetry add` 命令,但出现了这个错误。

poetry add openai-whisper 
Using version ^20230314 for openai-whisper

  • Installing triton (2.0.0): Failed

  RuntimeError

  Unable to find installation candidates for triton (2.0.0)

  at /usr/local/C

总结

### 文章总结
在尝试使用 Poetry 作为环境和依赖管理器来添加 `openai-whisper` 时,用户遇到了安装错误,具体是在安装 `openai-whisper` 依赖的 `triton (2.0.0)` 时失败。这个问题主要是由于 Poetry 无法找到 `triton (2.0.0)` 版本的安装候选,从而导致了 `RuntimeError`。
**主要信息和问题**:
- **目标**:安装 `openai-whisper`。
- **环境/工具**:使用 Poetry 作为依赖管理工具。
- **遇到的问题**:
- 安装 `triton (2.0.0)` 失败。
- 错误提示:`Unable to find installation candidates for triton (2.0.0)`,表明指定版本的 `triton` 在可用的资源库中不存在或无法访问。
**可能的解决方案**:
1. **检查版本号**:确认 `triton` 的版本 `2.0.0` 是否确实存在,或者是否有误。可以尝试查找该库支持的最新或稳定版本。
2. **更新或升级 Poetry**:确保 Poetry 是最新版本,因为老版本可能缺少对新软件包或对现有软件包新版本的支持。
3. **更换源**:查看是否可以通过修改配置来使用其他 PyPI 索引源,如镜像源,以解决网络或源不可用的问题。
4. **手动安装依赖**:如果可能,可以尝试直接手动安装 `triton` 库或通过其他方式进行安装,以绕过 Poetry 可能的问题。
5. **查看错误日志和社区**:检查完整的错误日志,看是否有更多关于为什么无法找到安装候选的线索。还可以在 GitHub 或相关论坛上搜索类似问题,看看其他用户是如何解决的。
通过这些步骤,用户应该能够更接近解决这个安装问题,或者至少找到问题的根源并确定有效的解决方案。

更新时间 2024-10-02