Chadrick Blog

error fix: pycuda "SystemError: initialization of _driver raised unreported exception"


I installed pycuda with pip install pycuda==2020.01 and it installed without any errors.

However when running the code, I got the following error.

in <module> from pycuda.\_driver import \* # noqa 
SystemError: initialization of \_driver raised unreported exception

appartenly importing pycuda itself was causing error.


I removed the install pycuda.

pip uninstall pycuda

downloaded pycuda source files(version 2020.01) and build&installed it from source.

$ tar xzf pycuda-2020.1.tar.gz
$ cd pycuda-2020.1
$ python --cuda-root=/usr/local/cuda
$ make install

After doing this, the above error did not occur.