occupancy_networks
occupancy_networks copied to clipboard
undefined symbol: cblas_sgemm_alloc
When I tried python setup.py build_ext --inplace
,It fails with the error:
Traceback (most recent call last): File "setup.py", line 7, in <module> from torch.utils.cpp_extension import BuildExtension, CppExtension, CUDAExtension File "/home/baichenghuan/anaconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/__init__.py", line 84, in <module> from torch._C import * ImportError: /home/baichenghuan/anaconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined symbol: cblas_sgemm_alloc
How to solve it?
I also triedconda install mkl -c anaconda
and conda update -n base -c defaults conda
but didn't work.
I had the same problem, and solved it by installing torch 1.0.1 !
Oh it finally works !Thanks a lot !
HI, I also add the same issue, but after installing torch 1.0.1, when I run python setup.py build_ext --inplace
it throws this error. Currently I am unable to solve it
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
Try sudo apt-get install python-numpy
HI, I also add the same issue, but after installing torch 1.0.1, when I run
python setup.py build_ext --inplace
it throws this error. Currently I am unable to solve itbuilding '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
Did you figure this one out.
Thanks, @jiyoonshincml it worked with your suggestion!
another method is useful: conda install mkl=2018 -c anaconda
HI, I also add the same issue, but after installing torch 1.0.1, when I run
python setup.py build_ext --inplace
it throws this error. Currently I am unable to solve it 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 1Did you figure this one out.
I solved by following the top answer: https://stackoverflow.com/questions/14657375/cython-fatal-error-numpy-arrayobject-h-no-such-file-or-directory there is a comment that:
Or, if you use cythonize() to make the ext_modules list,
include_dirs can be passed to setup()
follow that I add 'include_dirs' to setup, then it works