urbanogilson / SICAR

This tool is designed for students, researchers, data scientists or anyone who would like to have access to SICAR files
https://urbanogilson.github.io/posts/sicar/
MIT License
71 stars 30 forks source link

Error on runing at Ubuntu 22.04 lts - python 3.10.6 #10

Closed kylefelipe closed 1 year ago

kylefelipe commented 1 year ago

O.S = Ubuntu 22.04 Python = 3.10.06

Runing at a virtual env with python version as above i had the folowing issue:


Traceback (most recent call last):
  File "/(my_project_directory)/main.py", line 1, in <module>
    from SICAR import Sicar
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/SICAR/__init__.py", line 5, in <module>
    from SICAR.sicar import Sicar, OutputFormat
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/SICAR/sicar.py", line 22, in <module>
    from SICAR.drivers import Captcha, Tesseract
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/SICAR/drivers/__init__.py", line 7, in <module>
    from SICAR.drivers.paddle import Paddle
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/SICAR/drivers/paddle.py", line 1, in <module>
    from paddleocr import PaddleOCR
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/paddleocr/__init__.py", line 14, in <module>
    from .paddleocr import *
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/paddleocr/paddleocr.py", line 21, in <module>
    import paddle
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/paddle/__init__.py", line 25, in <module>
    from .framework import monkey_patch_variable
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/paddle/framework/__init__.py", line 17, in <module>
    from . import random  # noqa: F401
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/paddle/framework/random.py", line 16, in <module>
    import paddle.fluid as fluid
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/paddle/fluid/__init__.py", line 36, in <module>
    from . import framework
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/paddle/fluid/framework.py", line 37, in <module>
    from . import core
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/paddle/fluid/core.py", line 298, in <module>
    raise e
  File "/(my_project_directory)/.venv/lib/python3.10/site-packages/paddle/fluid/core.py", line 256, in <module>
    from . import core_avx
ImportError: /(my_project_directory)/.venv/lib/python3.10/site-packages/paddle/fluid/core_avx.so: undefined symbol: _dl_sym, version GLIBC_PRIVATE```

Updating paddlepaddle to 2.4.1 and it works
`pip install --force-reinstall paddlepaddle==2.4.1`
github-actions[bot] commented 1 year ago

Welcome! Your issue will be analyzed as soon as possible. Hopefully, we can find a solution to the problem together, please try to provide as much information as possible to help us identify and fix the bug or improve the repository.

urbanogilson commented 1 year ago

The issue is related to Paddle https://github.com/PaddlePaddle/Paddle/issues/44571.

It looks like the next version of Paddle will meet your requirements, we can test it using the nightly build by installing the version below.

!pip install git+https://github.com/urbanogilson/SICAR.git@10-error-on-runing-at-ubuntu-2204-lts-python-3106
!sudo apt install tesseract-ocr -y

If it works on your machine, I'll update to Paddle 2.4 when it's stable.

P.S. You can use the library on Google Colab and download the files directly to your Google Drive, or using Docker.

kylefelipe commented 1 year ago

The issue is related to Paddle PaddlePaddle/Paddle#44571.

It looks like the next version of Paddle will meet your requirements, we can test it using the nightly build by installing the version below.

!pip install git+https://github.com/urbanogilson/SICAR.git@10-error-on-runing-at-ubuntu-2204-lts-python-3106
!sudo apt install tesseract-ocr -y

If it works on your machine, I'll update to Paddle 2.4 when it's stable.

P.S. You can use the library on Google Colab and download the files directly to your Google Drive, or using Docker.

Works like a charm....

urbanogilson commented 1 year ago

11 should solve the problem