I did not need to install the packages suggested by @Algis, but the driver paths were different. So I had to do the following.
First determine the correct driver paths
Then set the paths as described by @Algis
import os
os.environ['NUMBAPRO_LIBDEVICE'] = "/usr/local/cuda-9.2/nvvm/libdevice"
os.environ['NUMBAPRO_NVVM'] = "/usr/local/cuda-9.2/nvvm/lib64/libnvvm.so"
source
share