voxelnet icon indicating copy to clipboard operation
voxelnet copied to clipboard

Error running setup.py

Open OneManArmy93 opened this issue 5 years ago • 10 comments

Hello, thank you for sharing your efforts. I tried to run the code as mentioned in the readme and I encountred this error which I'm stuck with for some time now:

running build_ext building 'utils.box_overlaps' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c ./utils/box_overlaps.c -o build/temp.linux-x86_64-3.5/./utils/box_overlaps.o ./utils/box_overlaps.c:498:31: fatal error: numpy/arrayobject.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 Any idea about what might have caused this? Thank you

OneManArmy93 avatar Aug 14 '19 06:08 OneManArmy93

Are you sure you installed all the libraries and packages required?

andrearama avatar Aug 14 '19 08:08 andrearama

yes, here is what I have installed: apt-get install libffi-dev apt-get install libssl-dev apt-get install python-dev pip install Cython apt-get install python-numpy pip install numpy pip install glob pip install numba pip install scipy pip install pandas pip install Shapely pip install easydict pip install matplotlib pip install pickle-mixin pip install multiprocess apt-get install -y libsm6 libxext6 libxrender-dev pip install opencv-python

OneManArmy93 avatar Aug 14 '19 08:08 OneManArmy93

I would suggest you to use a virtual environment to better manage such problems. I use conda, I have uploaded my virtual environment here

andrearama avatar Aug 15 '19 12:08 andrearama

I have the same issue. Did you manage to fix it?

dmfolgado avatar Sep 19 '19 09:09 dmfolgado

@dmfolgado yes I think what I did this to find the exact path of the numpy.py and add it

OneManArmy93 avatar Sep 19 '19 11:09 OneManArmy93

@dmfolgado have you tried to use the virtual environment that I shared?

andrearama avatar Sep 24 '19 10:09 andrearama

@andrearama using your environment did not worked for me, however, I the issue seems not to be related with it. I manage to fix it by including include_dirs=[numpy.get_include()] in setup.py.

setup( name='box overlaps', ext_modules=cythonize('./utils/box_overlaps.pyx'), include_dirs=[numpy.get_include()] )

dmfolgado avatar Sep 24 '19 10:09 dmfolgado

Try export CFLAGS="-I /usr/local/lib/python3.5/dist-packages/numpy/core/include $CFLAGS" before running setup. The middle parameter should be where your numpy include path is in your system.

Actually the setup.py has a comment about solving this.

jarvis-huang avatar Apr 14 '20 23:04 jarvis-huang

@andrearama using your environment did not worked for me, however, I the issue seems not to be related with it. I manage to fix it by including include_dirs=[numpy.get_include()] in setup.py.

setup( name='box overlaps', ext_modules=cythonize('./utils/box_overlaps.pyx'), include_dirs=[numpy.get_include()] )

I met the same problem, and I succeeded in your way.Thank you。

swzaaaaaaa avatar Jun 16 '20 11:06 swzaaaaaaa

Excuse me, has anyone encountered such an error code during compilation? ValueError: './utils/box_overlaps.pyx' doesn't match any files. What's causing this problem? Thanks!

Lytt-2020 avatar Mar 10 '22 00:03 Lytt-2020