#3280 cannot import name 'GenerationMixin' from 'transformers.generation' (E:\BaiduNetdiskDownload\_internal\transformers\gene

36.109* Posted at: 6 hours ago 👁10

cannot import name 'GenerationMixin' from 'transformers.generation' (E:\BaiduNetdiskDownload\_internal\transformers\generation\__init__.py)


=
system:Windows-10-10.0.19045-SP0
version:v3.97
frozen:True
language:zh
root_dir:E:/BaiduNetdiskDownload

1 Replies

这是由于 transformers 库版本不兼容导致的。pyVideoTrans v3.97 预打包版内置的 transformers 库版本可能过旧,与软件内部调用的新接口不匹配。

解决方案

  1. 更新 transformers

    • 打开命令提示符 (CMD)。
    • 使用 cd 命令切换到你的 pyVideoTrans 安装目录(例如:cd /d E:\BaiduNetdiskDownload)。
    • 执行以下命令更新库:pip install --upgrade transformers
  2. 重启软件:更新完成后,重新启动 sp.exe

如果更新后问题依旧,可能是预打包环境存在更深层次的冲突。作为备用方案,你可以尝试下载最新的 完整版 压缩包,解压到全新的、无中文空格的路径(如 D:\pyVideoTrans_v397)并运行。

请查阅相关文档:

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.

Related resource