'ImportError: cannot import name 'inference' from 'paddle'

I am trying to implement paddleocr. I have installed it using:

#Github repo installation for paddle
! python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple

#install paddle ocr
!pip install paddleocr

!git clone https://github.com/PaddlePaddle/PaddleOCR.git

But while importing

from paddleocr import PaddleOCR,draw_ocr

I'm getting this error: ImportError: cannot import name 'inference' from 'paddle'



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source