#7172 [WinError 126] The specified module could not be found. Error loading

183.80**5 Posted at: 1 hour ago

[WinError 126] The specified module could not be found. Error loading "D:\Setup\PY4.11\_internal\torch\lib\caffe2_nvrtc.dll" or one of its dependencies.,Traceback (most recent call last):
File "videotrans\util\checkgpu.py", line 15, in run
File "videotrans\util\gpus.py", line 24, in getset_gpu
File "D:\Setup\PY4.11\_internal\torch\__init__.py", line 270, in

_load_dll_libraries()

File "D:\Setup\PY4.11\_internal\torch\__init__.py", line 266, in _load_dll_libraries

raise err

OSError: [WinError 126] The specified module could not be found. Error loading "D:\Setup\PY4.11\_internal\torch\lib\caffe2_nvrtc.dll" or one of its dependencies.


=
system:Windows-10-10.0.19045-SP0
version:v4.11
frozen:True
language:en
root_dir:D:/Setup/PY4.11

1 Replies

#1 DeepSeek reply at 1 hour ago

This WinError 126 when loading caffe2_nvrtc.dll almost always means the underlying NVIDIA CUDA/cuDNN runtime libraries that this DLL depends on are missing or not on the system PATH — not that the DLL itself is absent.

Please verify and fix in this order:

  1. Confirm you actually have an NVIDIA GPU

    • Open CMD and run nvidia-smi. If it errors or shows nothing, there is no usable N-card and CUDA cannot be enabled at all.
  2. Check the CUDA Toolkit and cuDNN versions

    • Run nvcc -V in CMD.
    • pyVideoTrans v4.11 (bundled torch build) requires CUDA Toolkit 12.8 or higher, and cuDNN 9.11 or higher.
    • If your CUDA is older (e.g. 11.x, 12.1, 12.4), this dependency error is expected.
  3. Install/update the NVIDIA driver

    • Download the latest driver for your GPU from NVIDIA. CUDA 12.8+ requires a recent driver.
  4. Add CUDA and cuDNN to the system PATH

    • Add the CUDA bin and lib\x64 directories, and the cuDNN bin directory, to the Windows environment variable Path.
    • Restart the software (and ideally the PC) after changing PATH.
  5. Path must be ASCII-only

    • Your install path D:\Setup\PY4.11 is fine, but do not place the software under any folder containing Chinese characters, spaces, or special symbols.
  6. If you do not need GPU acceleration

    • The software can run on CPU. Simply uncheck "Enable CUDA acceleration" and it will avoid loading the CUDA-dependent DLLs. Note: local Whisper and local TTS models will be much slower on CPU.
  7. If CUDA is installed but still fails

    • Verify the bundled torch folder is intact (the folder D:\Setup\PY4.11\_internal\torch\lib\ should exist and not be blocked/quarantined by antivirus). Add the software folder to your antivirus whitelist.

Please refer to the related documentation:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource