Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error #117

Open
Blessing92 opened this issue Aug 18, 2022 · 3 comments
Open

Compiler error #117

Blessing92 opened this issue Aug 18, 2022 · 3 comments

Comments

@Blessing92
Copy link

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
Copy link

same issue as me

@liubohan1998
Copy link

liubohan1998 commented Nov 28, 2022

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
Copy link

jyC23333 commented Feb 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants