I am not able to import paddleocr library on Google Colab after the install of paddlepaddle and paddleocr successfully. It hits the error as shown below:
**from paddleocr import PaddleOCR, draw_ocr**
Error: Can not import paddle core while this file exists: /usr/local/lib/python3.10/dist-packages/paddle/fluid/libpaddle.so
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-e16532d3d475> in <cell line: 1>()
----> 1 from paddleocr import PaddleOCR, draw_ocr
2 import os
3 import cv2
4 import matplotlib.pyplot as plt
5 get_ipython().run_line_magic('matplotlib', 'inline')
8 frames
/usr/local/lib/python3.10/dist-packages/paddle/fluid/core.py in <module>
267
268 try:
--> 269 from . import libpaddle
270
271 if avx_supported() and not libpaddle.is_compiled_with_avx():
ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory
Previously, everything was okay but I am not able to import paddleOCR today. Appreciate the community help on this issue.
Using the following steps, I was able to get PaddleOCR to run in Google Colab:
Go the the "Runtime" tab, select "Change runtime type" and under "Hardware accelerator" select "GPU".
Upload the image to be analyzed in the
contentsection of Google Colab.Download the PaddleOCR modules using
pip:libssl1.1using Bash:!git clone https://github.com/PaddlePaddle/PaddleOCRThe output is below: