#5784 :Traceback (most recent call last):

240e:b8e* Posted at: 2 days ago

:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 202, in run
File "videotrans\__init__.py", line 28, in get_class
File "importlib\__init__.py", line 126, in import_module
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "videotrans\tts\_piper.py", line 10, in
File "pyimod02_importers.py", line 457, in exec_module
File "g2pw\__init__.py", line 1, in

from g2pw.api import G2PWConverter

File "pyimod02_importers.py", line 457, in exec_module
File "g2pw\api.py", line 9, in

from transformers import BertTokenizer

File "D:\video_tool\pyvideotrans\_internal\transformers\__init__.py", line 30, in

from . import dependency_versions_check

File "D:\video_tool\pyvideotrans\_internal\transformers\dependency_versions_check.py", line 56, in

require_version_core(deps[pkg])

File "D:\video_tool\pyvideotrans\_internal\transformers\utils\versions.py", line 116, in require_version_core

return require_version(requirement, hint)

File "D:\video_tool\pyvideotrans\_internal\transformers\utils\versions.py", line 110, in require_version

_compare_versions(op, got_ver, want_ver, requirement, pkg, hint)

File "D:\video_tool\pyvideotrans\_internal\transformers\utils\versions.py", line 43, in _compare_versions

raise ImportError(

ImportError: huggingface-hub>=1.3.0,

1 Replies

这是由于软件打包版中内置的 huggingface-hub 库版本(0.35.3)过低,导致与所需的 transformers 模块版本要求(>=1.3.0)冲突。该错误常见于 v4.05 早期打包版。

解决方法(按顺序尝试):

  1. 下载并覆盖最新补丁包:前往 pyVideoTrans 官方下载页面 下载最新补丁包(约 260MB),解压后直接覆盖到原软件根目录,确保 _internal 目录下的依赖版本同步更新。
  2. 如果没有补丁包,直接下载最新完整包(约 2.6GB),重新解压到非系统盘全英文路径(如 D:\pyVideoTrans)。
  3. 如果使用源码部署:在项目根目录执行 uv sync 即可自动修复依赖关系,确保所有包版本匹配。
  4. 临时规避:如果急需使用且暂时无法更新,可切换到不需要 transformers 的配音/识别渠道(例如使用 Edge-TTSfaster-whisper 等),避免触发该模块加载。
注意:打包版下不支持直接使用 pip install 修改内部依赖,必须通过重新下载官方发布包覆盖。

请查阅相关文档:

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 via ko-fi.com

Dondate via PayPal

Related resource