ImportError: Encountered error: Failed to import NATTEN‘s CPP backend.
装到 natten 0.21.0 了,而它要求 PyTorch ≥ 2.5,跟你现在的 torch 1.12.1+cu116 不兼容,所以报错。解决思路很简单:固定装老版本 natten(0.14.x 系列)且选择与你 torch=1.12.1、CUDA=11.6 匹配的 wheel。
# 1) 卸载
pip uninstall -y natten# 2) 安装与 torch==1.12.1+cu116 对齐的 wheel(0.14.6 是最后一版支持 1.12.1)
pip install --no-cache-dir "natten==0.14.6+torch1121cu116" -f https://shi-labs.com/natten/wheels/cu116/torch1.12.1/index.html
https://chatgpt.com/share/689c09ab-b074-8009-a9a4-a11893cd55cb