NeMo asr fails to build on Xavier JetPack

I’m trying to use NeMo for speech on Xavier. To install NeMo asr I do the following:

cd nemo_asr
sudo pip3 install .

A build occurs, and I install a number of dependencies. The one I can’t seem to resolve is llvmlite. It seems to require llvm 7.0 but this JetPack (4.3) seems to have llvm 6.0

Having trouble navigating this forum on the Xavier. I’ll paste error text when I get that to work.


There’s so much spew I don’t know where to start. But there seem to be two errors: scipy and llvmlite:

C compiler: aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC

creating build/temp.linux-aarch64-3.6/scipy/fft
creating build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft
compile options: ‘-DPOCKETFFT_PTHREADS -I/home/nvidia/.local/include/python3.6m -I/usr/local/include/python3.6 -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c’
extra options: ‘-std=c++14 -fvisibility=hidden’
aarch64-linux-gnu-g++: scipy/fft/_pocketfft/pypocketfft.cxx
scipy/fft/_pocketfft/pypocketfft.cxx:15:10: fatal error: pybind11/pybind11.h: No such file or directory
#include <pybind11/pybind11.h>
compilation terminated.
Running from scipy source directory.
/usr/local/lib/python3.6/dist-packages/numpy/distutils/ UserWarning: Specified path /usr/local/include/python3.6m is invalid.
return self.get_paths(self.section, key)
error: Command “aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPOCKETFFT_PTHREADS -I/home/nvidia/.local/include/python3.6m -I/usr/local/include/python3.6 -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c scipy/fft/_pocketfft/pypocketfft.cxx -o build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft/pypocketfft.o -MMD -MF build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft/pypocketfft.o.d -std=c++14 -fvisibility=hidden” failed with exit status 1

ERROR: Failed building wheel for scipy
Building wheel for llvmlite ( … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-2xprzlv7/llvmlite/’"’"’; file=’"’"’/tmp/pip-install-2xprzlv7/llvmlite/’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-8jeoj9sb
cwd: /tmp/pip-install-2xprzlv7/llvmlite/
Complete output (15 lines):
running bdist_wheel
/usr/bin/python3 /tmp/pip-install-2xprzlv7/llvmlite/ffi/
LLVM version… 6.0.0

Traceback (most recent call last):
File “/tmp/pip-install-2xprzlv7/llvmlite/ffi/”, line 168, in
File “/tmp/pip-install-2xprzlv7/llvmlite/ffi/”, line 158, in main
main_posix(‘linux’, ‘.so’)
File “/tmp/pip-install-2xprzlv7/llvmlite/ffi/”, line 120, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 7.0+ Be sure to set LLVM_CONFIG to the right executable path.
Read the documentation at for more information about building llvmlite.

error: command ‘/usr/bin/python3’ failed with exit status 1

ERROR: Failed building wheel for llvmlite
Running clean for llvmlite
Successfully built nemo-asr
Failed to build scipy llvmlite
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly

update on the subject:

You can install llvmlite on the Jetson using pip like this :

$ apt install llvm-10 llvm

then add a symbolic link to the new llvm-config-10 binary inside /usr/bin

$ cd /usr/bin && ln -s /usr/bin/llvm-config-10 llvm-config
then run pip install llvmlite
ollecting llvmlite
Downloading llvmlite-0.34.0.tar.gz (107 kB)
|████████████████████████████████| 107 kB 2.4 MB/s
Building wheels for collected packages: llvmlite
Building wheel for llvmlite ( … done