pycuda._driver.Error:cuInit failed:unknown error

For example, in the pytorch project, it is encountered in autoinit.py

pycuda._ driver.Error:cuInit failed:unknown error

Solution: install NVIDIA modprobe package:

sudo apt-get install nvidia-modprobe

Read More: