#5565 PS C:\Users\phf\Desktop\fy\pyvideotrans-main> uv run sp.pyerror: Failed to generate package metadata for `faster-whis

45.67* Posted at: 2 hours ago

PS C:\Users\phf\Desktop\fy\pyvideotrans-main> uv run sp.py
error: Failed to generate package metadata for `faster-whisper==1.2.1 @

   direct+https://github.com/SYSTRAN/faster-whisper/archive/refs/heads/master.tar.gz`

Caused by: Request failed after 3 retries in 10.3s
Caused by: Failed to fetch: https://github.com/SYSTRAN/faster-whisper/archive/refs/heads/master.tar.gz
Caused by: error sending request for url (https://github.com/SYSTRAN/faster-whisper/archive/refs/heads/master.tar.gz)
Caused by: client error (Connect)
Caused by: received corrupt message of type InvalidContentType

1 Replies

错误是因为 uv 无法从 GitHub 下载 faster-whisper 的源代码包,根本原因是网络连接失败(received corrupt message of type InvalidContentType),通常是由于中国大陆无法直接访问 GitHub,或代理配置不当造成的。

如果你是在中国大陆使用,建议按以下步骤排查:

  1. 检查网络能否直接访问 GitHub:在浏览器打开 https://github.com,若无法访问,请配置科学上网或使用国内代理。
  2. 配置代理:在终端中设置环境变量(以 HTTP 代理为例):

    set HTTPS_PROXY=http://127.0.0.1:端口
    set HTTP_PROXY=http://127.0.0.1:端口

    然后重新运行 uv run sp.py

  3. 临时使用国内镜像源(需 uv 支持):可尝试通过 uv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple 等方式,但注意 faster-whisper 是 Git 依赖,镜像可能不生效。
  4. 推荐使用 Windows 预打包版:如果你在 Windows 系统上,建议直接下载官方提供的 2.6GB 完整绿色版(sp.exe),解压后双击即可使用,完全避免源码部署的网络问题和依赖编译问题。下载地址:pyVideoTrans 下载页面

如果以上仍无法解决,请提供以下信息以便进一步分析:

  • 你的操作系统版本(Win10/Win11?)
  • 是否配置了系统代理或 VPN?
  • 软件安装目录的路径是否包含中文或空格?

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update. Dondate: ko-fi.com/jianchang512

Related resource