RuntimeError: GET was unable

I have RuntimeError when running code using pytorch.
My CUDA version on both nvidia-smi and nvcc --version are 12.0
PyTorch version: 2.3.0.dev20240202+cu121
Torchvision version: 0.18.0.dev20240202+cu121
Previously, I installed cudatoolkit=11.2.2 cudnn=8.1.0.
Here is my code:

import easyocr
import cv2
import numpy as np

def detect_text(image_path):
    reader = easyocr.Reader(['vi'])
    img = cv2.imread(image_path)
    result = reader.readtext(img)
    return result

result = detect_text('.png')

for res in result:
    text = res[1]

Could you uninstall the manually installed CUDA toolkit and cuDNN lib and let PyTorch use the one which ships in it’s binary?

After uninstalling: RuntimeError: cuDNN version incompatibility: PyTorch was compiled against (8, 9, 2) but found runtime version (8, 1, 0). PyTorch already comes bundled with cuDNN. One option to resolving this error is to ensure PyTorch can find the bundled cuDNN. one possibility is that there is a conflicting cuDNN in LD_LIBRARY_PATH.

Did you remove your locally installed cuDNN from LD_LIBRARY_PATH as suggested?

It worked when I removed locally installed cuDNN from LD_LIBRARY_PATH. Thank you!

1 Like