#1377 AttributeError: module 'torch._C' has no attribute '_has_magma'

154.12* Posted at: 5 hours ago 👁8

Traceback (most recent call last):
File "videotrans\mainwin\_actions_sub.py", line 97, in check_cuda
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 "torch\__init__.py", line 2064, in
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 "torch\cuda\__init__.py", line 147, in

# since it is supported on AMD GPU archs.

AttributeError: module 'torch._C' has no attribute '_has_magma'


=
system:Windows-10-10.0.22621-SP0
version:v3.83
frozen:True
language:zh
root_dir:C:/Users/Administrator/Desktop/win-videotrans-2.43

1 Replies

这个错误表明 PyTorch (torch) 在检测 CUDA 时遇到了内部兼容性问题。这通常发生在预打包版本中,可能由以下原因导致:

  1. PyTorch 与 CUDA 版本不匹配:预打包的 PyTorch 可能与您系统上的 CUDA 版本不兼容。
  2. 显卡驱动过旧:NVIDIA 显卡驱动程序版本太老。
  3. 软件路径问题:软件路径包含中文字符或特殊符号。

解决方案:

  1. 更新显卡驱动

    • 访问 NVIDIA 官网下载并安装最新的显卡驱动程序。
  2. 检查软件路径

    • 确保软件解压路径为纯英文,例如 D:/videotrans。您当前的路径 C:/Users/Administrator/Desktop/win-videotrans-2.43 包含中文用户名 "Administrator",这可能导致问题。请将整个软件文件夹移动到纯英文路径下(如 D:/videotrans)再尝试运行。
  3. 软件内部修复

    • 在软件启动时弹出的 CUDA 检测窗口中,如果显示 CUDA 不可用,请不要勾选 CUDA 加速选项,先使用 CPU 模式进行处理。
  4. 重新下载完整包

    • 如果以上方法无效,建议从官网重新下载完整的软件包(非升级包),并确保解压到纯英文路径。

如果问题依旧,请在纯英文路径下运行软件,并提供 videotrans/logs/ 目录下的最新日志文件以便进一步分析。

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions