ModuleNotFoundError: No module named 'paddle.fluid.core_noavx'?

5.5k Views Asked by At

I install paddle_ocr and paddlepaddle packages also but i got an Error (ModuleNotFoundError: No module named 'paddle.fluid.core_noavx'). how to solve this type of error provide your suggestions here...below my code was attached

 from paddleocr import PaddleOCR,draw_ocr
# Paddleocr supports Chinese, English, French, German, Korean and Japanese.
# You can set the parameter `lang` as `ch`, `en`, `french`, `german`, `korean`, `japan`
# to switch the language model in order.
ocr = PaddleOCR(use_angle_cls=True, lang='en') # need to run only once to download and load model into memory
img_path = 'PaddleOCR/doc/imgs_en/img_12.jpg'
result = ocr.ocr(img_path, cls=True)
for line in result:
    print(line)
2

There are 2 best solutions below

2
On

It looks like the paddle package is developed for multiple platforms including non-x86 architectures that don't have the AVX instruction set. When the package is compiled for each architecture it checks if AVX is implemented and then modifies the packaging to have either the paddle.fluid.core_avx or paddle.fluid.core_noavx namespace.

If you want to handle this programmatically, paddle.fluid.core has a variable has_noavx_core that you can check.

from paddle.fluid.core import has_noavx_core

if has_noavx_core:
    import paddle.fluid.core_noavx as core_noavx
0
On

The machine does not support avx, you can try:

python3 -m pip install paddlepaddle-gpu==2.0.2 -f https://paddlepaddle.org.cn/whl/stable/noavx.html

If the CPU environment is used, remove the gpu