OccNet
OccNet copied to clipboard
Error while runnig ./tools/train.py
After running the cmd python3 ./tools/train.py , it is asking to install mmcv>=2.0.0 , but while running pip install mmcv==2.0.0 an error is coming that i have shown below,
By running ``python3 ./tools/train.py ```
Traceback (most recent call last):
File "./tools/train.py", line 21, in
By running pip install mmcv==2.0.0
Requirement already satisfied: six>=1.5 in /home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib->mmengine>=0.2.0->mmcv==2.0.0) (1.16.0) Building wheels for collected packages: mmcv Building wheel for mmcv (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [587 lines of output] running bdist_wheel /home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/utils/cpp_extension.py:370: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) running build running build_py gcc -pthread -B /home/umic/anaconda3/envs/open-mmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMMCV_WITH_CUDA -I/tmp/pip-install-lx22zhsn/mmcv_8d5cb1b3546046e9b22169fac12b078c/mmcv/ops/csrc/pytorch -I/tmp/pip-install-lx22zhsn/mmcv_8d5cb1b3546046e9b22169fac12b078c/mmcv/ops/csrc/common -I/tmp/pip-install-lx22zhsn/mmcv_8d5cb1b3546046e9b22169fac12b078c/mmcv/ops/csrc/common/cuda -I/home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include -I/home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include/TH -I/home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/umic/anaconda3/envs/open-mmlab/include/python3.8 -c ./mmcv/ops/csrc/pytorch/points_in_boxes.cpp -o build/temp.linux-x86_64-3.8/./mmcv/ops/csrc/pytorch/points_in_boxes.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ gcc -pthread -B /home/umic/anaconda3/envs/open-mmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DMMCV_WITH_CUDA -I/tmp/pip-install-lx22zhsn/mmcv_8d5cb1b3546046e9b22169fac12b078c/mmcv/ops/csrc/pytorch -I/tmp/pip-install-lx22zhsn/mmcv_8d5cb1b3546046e9b22169fac12b078c/mmcv/ops/csrc/common -I/tmp/pip-install-lx22zhsn/mmcv_8d5cb1b3546046e9b22169fac12b078c/mmcv/ops/csrc/common/cuda -I/home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include -I/home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include/TH -I/home/umic/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/umic/anaconda3/envs/open-mmlab/include/python3.8 -c ./mmcv/ops/csrc/pytorch/info.cpp -o build/temp.linux-x86_64-3.8/./mmcv/ops/csrc/pytorch/info.o -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ ./mmcv/ops/csrc/pytorch/info.cpp:15:30: fatal error: cuda_runtime_api.h: No such file or directory #include <cuda_runtime_api.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mmcv Running setup.py clean for mmcv Failed to build mmcv ERROR: Could not build wheels for mmcv, which is required to install pyproject.toml-based projects
Hello, you should check your Cuda version is 11.1 and try again. I met this error many times, the package install process was very annoying.