#12414·mmdetection

pip install -v -e . ModuleNotFoundError: No module named 'torch'

Author: LambdaOvOCreated Nov 19, 2025Updated Apr 6, 2026

When installing mmdetection from the source code, an error occurred indicating that it could not be installed. Error message: ModuleNotFoundError: No module named 'torch'. Environment: Nvidia 50 Series graphics card, cuda12.8, pytorch2.9.1. I have also tried many versions of Pytorch and encountered the same problem

源码安装mmdetection时,报错无法安装。错误消息:ModuleNotFoundError: No module named 'torch'。 环境:英伟达50系显卡,cuda12.8, pytorch2.9.1 我也尝试了许多pytorch版本,同样会遇到这个问题