voxelnet
voxelnet copied to clipboard
Error running setup.py
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
Are you sure you installed all the libraries and packages required?
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
I would suggest you to use a virtual environment to better manage such problems. I use conda, I have uploaded my virtual environment here
I have the same issue. Did you manage to fix it?
@dmfolgado yes I think what I did this to find the exact path of the numpy.py and add it
@dmfolgado have you tried to use the virtual environment that I shared?
@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()] )
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.
@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()]
insetup.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。
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!