You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue while using EasyOCR on my system. Despite updating Pillow to the recommended version, I still receive the following error when executing my script:
Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU. Traceback (most recent call last): File "/Users/pierreburianne/Desktop/import easyocr.py", line 3, in <module> result = reader.readtext('/Users/pierreburianne/Downloads/similar_frame_0.jpg') File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/easyocr/easyocr.py", line 468, in readtext result = self.recognize(img_cv_grey, horizontal_list, free_list,\ File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/easyocr/easyocr.py", line 383, in recognize image_list, max_width = get_image_list(h_list, f_list, img_cv_grey, model_height = imgH) File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/easyocr/utils.py", line 613, in get_image_list crop_img,ratio = compute_ratio_and_resize(crop_img,width,height,model_height) File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/easyocr/utils.py", line 576, in compute_ratio_and_resize img = cv2.resize(img,(int(model_height*ratio),model_height),interpolation=Image.Resampling.LANCZOS) File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/PIL/Image.py", line 77, in __getattr__ raise AttributeError(f"module '{__name__}' has no attribute '{name}'") AttributeError: module 'PIL.Image' has no attribute 'Resampling'
Environment:
Python version: 3.9.6
EasyOCR version: 1.7.1
Pillow version: 9.5.0
I've tried updating Pillow, reinstalling libraries, and even recreating my virtual environment, but the issue persists.
Could you please assist me in resolving this issue?
Thank you very much for your help.
The text was updated successfully, but these errors were encountered:
Hello,
I'm encountering an issue while using EasyOCR on my system. Despite updating Pillow to the recommended version, I still receive the following error when executing my script:
Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU. Traceback (most recent call last): File "/Users/pierreburianne/Desktop/import easyocr.py", line 3, in <module> result = reader.readtext('/Users/pierreburianne/Downloads/similar_frame_0.jpg') File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/easyocr/easyocr.py", line 468, in readtext result = self.recognize(img_cv_grey, horizontal_list, free_list,\ File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/easyocr/easyocr.py", line 383, in recognize image_list, max_width = get_image_list(h_list, f_list, img_cv_grey, model_height = imgH) File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/easyocr/utils.py", line 613, in get_image_list crop_img,ratio = compute_ratio_and_resize(crop_img,width,height,model_height) File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/easyocr/utils.py", line 576, in compute_ratio_and_resize img = cv2.resize(img,(int(model_height*ratio),model_height),interpolation=Image.Resampling.LANCZOS) File "/Users/pierreburianne/Library/Python/3.9/lib/python/site-packages/PIL/Image.py", line 77, in __getattr__ raise AttributeError(f"module '{__name__}' has no attribute '{name}'") AttributeError: module 'PIL.Image' has no attribute 'Resampling'
Environment:
Python version: 3.9.6
EasyOCR version: 1.7.1
Pillow version: 9.5.0
I've tried updating Pillow, reinstalling libraries, and even recreating my virtual environment, but the issue persists.
Could you please assist me in resolving this issue?
Thank you very much for your help.
The text was updated successfully, but these errors were encountered: