Banconxuan / RTM3D

The official PyTorch Implementation of RTM3D and KM3D for Monocular 3D Object Detection
MIT License
454 stars 85 forks source link

ERROR python setup.py install #24

Open CVUsers opened 3 years ago

CVUsers commented 3 years ago

Compile iou3d (from pointRCNN). GCC>4.9, I have tested it with GCC 5.4.0 and GCC 4.9.4, both of them are ok. cd $KM3D_ROOT/src/lib/utiles/iou3d python setup.py install

I have this error ,and

I've been using Google for a long time and I don't have the right solution : In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:3:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here T data() const { ^~~~ src/iou3d.cpp:132:40: warning: ‘T at::Tensor::data() const [with T = long int]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations] long keep_data = keep.data(); ^ In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Tensor.h:3:0, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Context.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/serialize/input-archive.h:6, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/serialize/archive.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/serialize/tensor.h:3, from src/iou3d.cpp:1: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:363:7: note: declared here T data() const { ^~~~ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

walzimmer commented 3 years ago

Are you using Ubuntu 16 and cuda 9? It worked for me with gcc 5.4 and g++ 5.4.

You also need this package here: apt-get install build-essential