Deep Learning & Machine Learning/Tensorflow&PyTorch 개발환경

failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected 해결 방법

webnautes 2024. 3. 14. 20:24
반응형

tensorflow를 사용하던 중에 발생한 failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected 에러가 나는 경우 해결하는 방법입니다.



2024. 3. 14 최초작성




다음 코드를 추가하면 해결됩니다.



import os
os.environ['CUDA_VISIBLE_DEVICES'] = "0" 




참고

https://stackoverflow.com/a/51767213 



반응형