To install matlab.engine on Ubuntu, do the followings:
cd $(dirname $(realpath $(which matlab)))/../extern/engines/python python setup.py build --build-base=$(mktemp -d) install