autonomousvision / occupancy_networks

This repository contains the code for the paper "Occupancy Networks - Learning 3D Reconstruction in Function Space"
https://avg.is.tuebingen.mpg.de/publications/occupancy-networks
MIT License
1.48k stars 291 forks source link

Compiler error #117

Open Blessing92 opened 1 year ago

Blessing92 commented 1 year ago

Hello, thank you so much for this awesome work. However, I am running into this error below when I run python setup.py build_ext --inplace. Has anyone encountered this error? Any help is much appreciated.

building 'im2mesh.utils.libkdtree.pykdtree.kdtree' extension gcc -pthread -B /home/alphaar/anaconda3/envs/mesh_funcspace/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/alphaar/anaconda3/envs/mesh_funcspace/include/python3.6m -c im2mesh/utils/libkdtree/pykdtree/kdtree.c -o build/temp.linux-x86_64-3.6/im2mesh/utils/libkdtree/pykdtree/kdtree.o -std=c99 -O3 -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=kdtree -D_GLIBCXX_USE_CXX11_ABI=0 im2mesh/utils/libkdtree/pykdtree/kdtree.c:525:10: fatal error: numpy/arrayobject.h: No such file or directory 525 | #include "numpy/arrayobject.h" | ^~~~~ compilation terminated. error: command 'gcc' failed with exit status 1

fatsheep2020 commented 1 year ago

same issue as me

liubohan1998 commented 1 year ago

at the end of the setup.py file, find:

setup( ext_modules=cythonize(ext_modules), include_dirs=[numpy_include_dir], cmdclass={ 'build_ext': BuildExtension } )

add "include_dirs=[numpy_include_dir]," as above.

That's how I solved this error, hope this help.

jyC23333 commented 1 year ago

at the end of the setup.py file, find:

setup( ext_modules=cythonize(ext_modules), include_dirs=[numpy_include_dir], cmdclass={ 'build_ext': BuildExtension } )

add "include_dirs=[numpy_include_dir]," as above.

That's how I solved this error, hope this help.

problem is solved. thanks.