Python错误笔记(一):CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up env

错误提示

RuntimeError: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero.

解决方式

1.重启系统
2.sudo apt-get install nvidia-modprobe

你可能感兴趣的:(python,ubuntu,Error)