#3331 cannot import name 'GenerationMixin' from 'transformers.generation' (D:\pyvideotrans2\win-pyvideotrans-v3.97 (1)\_intern

162.211* Posted at: 3 days ago 👁18

cannot import name 'GenerationMixin' from 'transformers.generation' (D:\pyvideotrans2\win-pyvideotrans-v3.97 (1)\_internal\transformers\generation\__init__.py)


=
system:Windows-10-10.0.20348-SP0
version:v3.97
frozen:True
language:en
root_dir:D:/pyvideotrans2/win-pyvideotrans-v3.97 (1)

1 Replies

This error is caused by an incompatible version of the transformers library within the pre-packaged Windows version of pyVideoTrans.

The error cannot import name 'GenerationMixin' indicates that the internal transformers library version is outdated and does not match the requirements of the newer AI models or features you are trying to use.

Solution Steps:

  1. Update the software: Download the latest complete package (not the patch) of pyVideoTrans v3.97 from the official source. The pre-packaged version you have may contain outdated dependencies.
  2. Clean installation: Extract the new complete package to a new directory with a path that contains no spaces or Chinese characters (e.g., D:\pyVideoTrans). Do not extract it over your existing installation (D:\pyvideotrans2\win-pyvideotrans-v3.97 (1)), as the path contains spaces (1) which is not recommended.
  3. Run from new location: Launch the software by double-clicking sp.exe from the new, clean directory.

Important Notes:

  • Do not run the software directly from inside the compressed archive.
  • Do not install it in system-protected directories like C:\Program Files.
  • The path D:\pyvideotrans2\win-pyvideotrans-v3.97 (1) is problematic because of the space before (1). Always use a simple path like D:\pyVideoTrans.

Please refer to the relevant documentation:

Post Your Reply