fatal error: THC/THC.h: No such file or directory
See original GitHub issueI got this error when I followed the installation instructions. Everything worked well until
pip install -v -e .
It eventually raised error:
...
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
mmdet3d/ops/ball_query/src/ball_query.cpp:4:10: fatal error: THC/THC.h: No such file or directory
#include <THC/THC.h>
^~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
ERROR: Command errored out with exit status 1:
...
Could someone please tell me how to solve this?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Question about THC\THC.h - PyTorch Forums
and when I install the ninja with symbolic links. Failed occur: fatal error: THC/THC.h: No such file or directory and another error is....
Read more >Replacing THC/THC.h module to ATen/ATen.h module
I found out that TH(C) methods were currently deprecated in recent version of pytorch, and was replaced by ATen API (https://discuss.pytorch.org ...
Read more >PointTransformer编译pointops_cuda报错fatal error: THC/THC.h
fatal error : THC/THC.h: No such file or directory.
Read more >Cutorch installation issue - Google Groups
/tmp/luarocks_cutorch-scm-1-8303/cutorch/lib/THC/THCGeneral.h:4:23: fatal error: THGeneral.h: No such file or directory. compilation terminated. CMake Error ...
Read more >项目环境搭建- Dreamer_szy - 博客园
reading manifest file 'nv_wavenet_ext.egg-info/SOURCES.txt' writing manifest ... fatal error: THC/THC.h: No such file or directory #include ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, it seems that the TH/THC include files have been removed in the latest pytorch version. mmdet3d still has to be adjusted to these changes, I guess.
I just solved this problem by reinstalling pytorch. I’ve tried to downgrade gcc, reinstall mmdet3d, had double checked mmcv version and did
git checkout devfor mmdet3d but none of them seemed to work.I referenced an answer on https://discuss.pytorch.org/t/question-about-thc-thc-h/147145. It seems that it would automatically install latest version if you follow the instructions on pytorch website and it could be inadaptable with the environment. I reinstalled pytorch to 1.6 and could successfully install mmdet3d.
Thanks a lot anyway.