#1198·EasyOCR

TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

Author: tommedemaCreated Jan 7, 2024Updated Mar 7, 2026

Given this python code:

    import cv2
    import easyocr
    from PIL import Image

    # Initialize EasyOCR Reader
    reader = easyocr.Reader(['en'], detect_network = 'dbnet18')

    # Read the image
    image = cv2.imread(image_path)
    if image is None:
        raise ValueError("Image not found or unable to load.")
    print(f"Image dimensions (HxW): {image.shape[0]}x{image.shape[1]}")

    # Use EasyOCR to detect text regions
    horizontal_list, _ = reader.detect(image)

I get:

TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

On Macbook Air 15" Apple M2 chipset