安装mmcv-full时报错:Could not build wheels for mmcv-full, which is required to install pyproject.toml-bas
【代码】安装mmcv-full时报错:Could not build wheels for mmcv-full, which is required to install pyproject.toml-bas。
·
安装mmcv-full时报错
- 报错ERROR: Could not build wheels for mmcv-full, which is required to install pyproject.toml-based projects
- 详细报错信息如下:
copying mmcv/ops/csrc/tensorrt/plugins/trt_scatternd_kernel.cu -> build/lib.linux-x86_64-3.8/mmcv/ops/csrc/tensorrt/plugins
running build_ext
error: [Errno 2] No such file or directory: ':/usr/local/cuda-12.2/bin/nvcc'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mmcv-full
Running setup.py clean for mmcv-full
Failed to build mmcv-full
ERROR: Could not build wheels for mmcv-full, which is required to install pyproject.toml-based projects
- 往上寻找最开始的报错点,为这一句:
error: [Errno 2] No such file or directory: ':/usr/local/cuda-12.2/bin/nvcc'
[end of output]
- 参考资料得出,路径前不该有
:,导致虽然/usr/local/cuda-12.2/bin/路径下有nvcc文件,但是仍然找不到 - 输入以下代码,临时添加cuda环境变量(仅供这次ssh远程登陆时使用)
- 注意,不管你的cuda版本为多少,都原封不动的输入以下代码
export CUDA_HOME=/usr/local/cuda
- 之后再次运行
pip install mmcv-full即可
参考文献
更多推荐



所有评论(0)