jackroos/VL-BERT

./scripts/init.sh

alice-cool opened this issue · 4 comments

this code can't run because it has erros as the flowing.

running build_ext
building 'C_ROIPooling' extension
gcc -pthread -B /home/anaconda3/envs/vl-bert/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/tmp/pycharm_project_61/common/lib/roi_pooling -I/home/byd/.local/lib/python3.6/site-packages/torch/lib/include -I/home/byd/.local/lib/python3.6/site-packages/torch/lib/include/TH -I/home/byd/.local/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/anaconda3/envs/vl-bert/include/python3.6m -c /tmp/pycharm_project_61/common/lib/roi_pooling/vision.cpp -o build/temp.linux-x86_64-3.6/tmp/pycharm_project_61/common/lib/roi_pooling/vision.o -DTORCH_EXTENSION_NAME=C_ROIPooling -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /tmp/pycharm_project_61/common/lib/roi_pooling/ROIAlign.h:4:0,
                 from /tmp/pycharm_project_61/common/lib/roi_pooling/vision.cpp:3:
/tmp/pycharm_project_61/common/lib/roi_pooling/cpu/vision.h:3:29: fatal error: torch/extension.h: 没有那个文件或目录
 #include <torch/extension.h>
                             ^
compilation terminated.
error: command 'gcc' failed with exit status 1

If you have ways, please tell me.

What is the version of your pytorch?

Dear scholar, I use pip list ,I found torch 0.4.0. I use conda list, I found pytorch 1.1.0 py3.6_cuda9.0.176_cudnn7.5.1_0 pytorch

I upgrade my torch to 1.1.0 consistent with the version of Pytorch. 1.1.0 and it could run a long way.hah