PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
42.81k stars 7.69k forks source link

Unable to instantiate ppstructure due to "TypeError: __init__() got an unexpected keyword argument 'threshold'" #4659

Closed felixgao closed 2 years ago

felixgao commented 2 years ago
  File "/Users/ggao/github/opensource/paddle-paddle/.venv/lib/python3.8/site-packages/streamlit/script_runner.py", line 354, in _run_script
    exec(code, module.__dict__)
  File "/Users/ggao/github/opensource/paddle-paddle/ocr_app.py", line 13, in <module>
    from ocr.recognizer import recognize_structure
  File "/Users/ggao/github/opensource/paddle-paddle/ocr/__init__.py", line 1, in <module>
    from .recognizer import recognize
  File "/Users/ggao/github/opensource/paddle-paddle/ocr/recognizer.py", line 52, in <module>
    table_engine = PPStructure(show_log=False, use_gpu=False)
  File "/Users/ggao/github/opensource/paddle-paddle/.venv/lib/python3.8/site-packages/paddleocr/paddleocr.py", line 405, in __init__
    super().__init__(params)
  File "/Users/ggao/github/opensource/paddle-paddle/.venv/lib/python3.8/site-packages/paddleocr/ppstructure/predict_system.py", line 54, in __init__
    self.table_layout = lp.PaddleDetectionLayoutModel(config_path=config_path,
TypeError: __init__() got an unexpected keyword argument 'threshold'

as the code indicates, it fails at table_engine = PPStructure(show_log=False, use_gpu=False)

paddleocr = "2.3.0.1" paddlepaddle = "2.2.0"

littletomatodonkey commented 2 years ago

你好,我按照官网代码运行没有问题,请确保layoutoparser的安装无误。

https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.3/ppstructure/README_ch.md

image

felixgao commented 2 years ago

I used poetry to manage my dependencies and it seems to be installed fine.

poetry show                        
altair                            4.1.0       Altair: A declarative statistical visualization library for Python.
appnope                           0.1.2       Disable App Nap on macOS >= 10.9
argon2-cffi                       21.1.0      The secure Argon2 password hashing algorithm.
asgiref                           3.4.1       ASGI specs, helper code, and adapters
astor                             0.8.1       Read/rewrite/write Python ASTs
attrs                             21.2.0      Classes Without Boilerplate
babel                             2.9.1       Internationalization utilities
backcall                          0.2.0       Specifications for callback functions passed in to an API
backports.entry-points-selectable 1.1.1       Compatibility shim providing selectable entry points for older implementa...
backports.zoneinfo                0.2.1       Backport of the standard library zoneinfo module
base58                            2.1.1       Base58 and Base58Check implementation.
bce-python-sdk                    0.8.62      BCE SDK for python
bleach                            4.1.0       An easy safelist-based HTML-sanitizing tool.
blinker                           1.4         Fast, simple object-to-object and broadcast signaling
cachetools                        4.2.4       Extensible memoizing collections and decorators
certifi                           2021.10.8   Python package for providing Mozilla's CA Bundle.
cffi                              1.15.0      Foreign Function Interface for Python calling C code.
cfgv                              3.3.1       Validate configuration and produce human readable error messages.
chardet                           4.0.0       Universal encoding detector for Python 2 and 3
charset-normalizer                2.0.7       The Real First Universal Charset Detector. Open, modern and actively main...
click                             7.1.2       Composable command line interface toolkit
cssselect                         1.1.0       cssselect parses CSS3 Selectors and translates them to XPath 1.0
cssutils                          2.3.0       A CSS Cascading Style Sheets library for Python
cycler                            0.11.0      Composable style cycles
debugpy                           1.5.1       An implementation of the Debug Adapter Protocol for Python
decorator                         5.1.0       Decorators for Humans
defusedxml                        0.7.1       XML bomb protection for Python stdlib modules
distlib                           0.3.3       Distribution utilities
entrypoints                       0.3         Discover and load entry points from installed packages.
et-xmlfile                        1.1.0       An implementation of lxml.xmlfile for the standard library
fastapi                           0.68.2      FastAPI framework, high performance, easy to learn, fast to code, ready f...
filelock                          3.3.2       A platform independent file lock.
flake8                            4.0.1       the modular source code checker: pep8 pyflakes and co
flask                             2.0.2       A simple framework for building complex web applications.
flask-babel                       2.0.0       Adds i18n/l10n support to Flask applications
future                            0.18.2      Clean single-source support for Python 3 and 2
gitdb                             4.0.9       Git Object Database
gitpython                         3.1.24      GitPython is a python library used to interact with Git repositories
h11                               0.12.0      A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
identify                          2.3.5       File identification library for Python
idna                              3.3         Internationalized Domain Names in Applications (IDNA)
imageio                           2.10.4      Library for reading and writing a wide range of image, video, scientific,...
imgaug                            0.4.0       Image augmentation library for deep neural networks
importlib-resources               5.4.0       Read resources from Python packages
iopath                            0.1.9       A library for providing I/O abstraction.
ipykernel                         6.5.0       IPython Kernel for Jupyter
ipython                           7.29.0      IPython: Productive Interactive Computing
ipython-genutils                  0.2.0       Vestigial utilities from IPython
ipywidgets                        7.6.5       IPython HTML widgets for Jupyter
itsdangerous                      2.0.1       Safely pass data to untrusted environments and back.
jedi                              0.18.0      An autocompletion tool for Python that can be used for text editors.
jinja2                            3.0.3       A very fast and expressive template engine.
jsonschema                        4.2.1       An implementation of JSON Schema validation for Python
jupyter-client                    7.0.6       Jupyter protocol implementation and client libraries
jupyter-core                      4.9.1       Jupyter core package. A base package on which Jupyter projects rely.
jupyterlab-pygments               0.1.2       Pygments theme using JupyterLab CSS variables
jupyterlab-widgets                1.0.2       A JupyterLab extension.
kiwisolver                        1.3.2       A fast implementation of the Cassowary constraint solver
layoutparser                      0.3.2       A unified toolkit for Deep Learning Based Document Image Analysis
lmdb                              1.2.1       Universal Python binding for the LMDB 'Lightning' Database
lxml                              4.6.4       Powerful and Pythonic XML processing library combining libxml2/libxslt wi...
markupsafe                        2.0.1       Safely add untrusted strings to HTML/XML markup.
matplotlib                        3.4.3       Python plotting package
matplotlib-inline                 0.1.3       Inline Matplotlib backend for Jupyter
mccabe                            0.6.1       McCabe checker, plugin for flake8
mistune                           0.8.4       The fastest markdown parser in pure Python
nbclient                          0.5.8       A client library for executing notebooks. Formerly nbconvert's ExecutePre...
nbconvert                         6.3.0       Converting Jupyter Notebooks
nbformat                          5.1.3       The Jupyter Notebook format
nest-asyncio                      1.5.1       Patch asyncio to allow nested event loops
networkx                          2.6.3       Python package for creating and manipulating graphs and networks
nodeenv                           1.6.0       Node.js virtual environment builder
notebook                          6.4.5       A web-based notebook environment for interactive computing
numpy                             1.21.1      NumPy is the fundamental package for array computing with Python.
opencv-contrib-python             4.4.0.46    Wrapper package for OpenCV python bindings.
opencv-python                     4.5.3.56    Wrapper package for OpenCV python bindings.
openpyxl                          3.0.9       A Python library to read/write Excel 2010 xlsx/xlsm files
packaging                         21.2        Core utilities for Python packages
paddleocr                         2.3.0.1     Awesome OCR toolkits based on PaddlePaddle (8.6M ultra-lightweight pre-tr...
paddlepaddle                      2.2.0       Parallel Distributed Deep Learning
pandas                            1.3.4       Powerful data structures for data analysis, time series, and statistics
pandocfilters                     1.5.0       Utilities for writing pandoc filters in python
parso                             0.8.2       A Python Parser
pdf2image                         1.16.0      A wrapper around the pdftoppm and pdftocairo command line tools to conver...
pdfminer.six                      20200517    PDF parser and analyzer
pdfplumber                        0.5.28      Plumb a PDF for detailed information about each char, rectangle, and line.
pexpect                           4.8.0       Pexpect allows easy control of interactive console applications.
pickleshare                       0.7.5       Tiny 'shelve'-like database with concurrency support
pillow                            8.4.0       Python Imaging Library (Fork)
platformdirs                      2.4.0       A small Python module for determining appropriate platform-specific dirs,...
portalocker                       2.3.2       Wraps the portalocker recipe for easy usage
pre-commit                        2.15.0      A framework for managing and maintaining multi-language pre-commit hooks.
premailer                         3.10.0      Turns CSS blocks into style attributes
prometheus-client                 0.12.0      Python client for the Prometheus monitoring system.
prompt-toolkit                    3.0.22      Library for building powerful interactive command lines in Python
protobuf                          3.19.1      Protocol Buffers
ptyprocess                        0.7.0       Run a subprocess in a pseudo terminal
pyarrow                           6.0.0       Python library for Apache Arrow
pyclipper                         1.3.0       Cython wrapper for the C++ translation of the Angus Johnson's Clipper lib...
pycodestyle                       2.8.0       Python style guide checker
pycparser                         2.21        C parser in Python
pycryptodome                      3.11.0      Cryptographic library for Python
pydantic                          1.8.2       Data validation and settings management using python 3.6 type hinting
pydeck                            0.7.1       Widget for deck.gl maps
pyflakes                          2.4.0       passive checker of Python programs
pygments                          2.10.0      Pygments is a syntax highlighting package written in Python.
pympler                           0.9         A development tool to measure, monitor and analyze the memory behavior of...
pyparsing                         2.4.7       Python parsing module
pyrsistent                        0.18.0      Persistent/Functional/Immutable data structures
python-dateutil                   2.8.2       Extensions to the standard Python datetime module
python-levenshtein                0.12.2      Python extension for computing string edit distances and similarities.
python-multipart                  0.0.5       A streaming multipart parser for Python
pytz                              2021.3      World timezone definitions, modern and historical
pytz-deprecation-shim             0.1.0.post0 Shims to make deprecation of pytz easier
pywavelets                        1.2.0       PyWavelets, wavelet transform module
pyyaml                            6.0         YAML parser and emitter for Python
pyzmq                             22.3.0      Python bindings for 0MQ
requests                          2.26.0      Python HTTP for Humans.
scikit-image                      0.17.2      Image processing in Python
scipy                             1.6.1       SciPy: Scientific Library for Python
send2trash                        1.8.0       Send file to trash natively under Mac OS X, Windows and Linux.
shapely                           1.8.0       Geometric objects, predicates, and operations
shellcheck-py                     0.8.0.1     Python wrapper around invoking shellcheck (https://www.shellcheck.net/)
six                               1.16.0      Python 2 and 3 compatibility utilities
smmap                             5.0.0       A pure Python implementation of a sliding window memory map manager
sortedcontainers                  2.4.0       Sorted Containers -- Sorted List, Sorted Dict, Sorted Set
starlette                         0.14.2      The little ASGI library that shines.
streamlit                         1.2.0       The fastest way to build data apps in Python
terminado                         0.12.1      Tornado websocket backend for the Xterm.js Javascript terminal emulator l...
testpath                          0.5.0       Test utilities for code working with files and commands
tifffile                          2021.11.2   Read and write TIFF files
toml                              0.10.2      Python Library for Tom's Obvious, Minimal Language
toolz                             0.11.2      List processing tools and functional utilities
tornado                           6.1         Tornado is a Python web framework and asynchronous networking library, or...
tqdm                              4.62.3      Fast, Extensible Progress Meter
traitlets                         5.1.1       Traitlets Python configuration system
typing-extensions                 4.0.0       Backported and Experimental Type Hints for Python 3.6+
tzdata                            2021.5      Provider of IANA time zone data
tzlocal                           4.1         tzinfo object for the local timezone
urllib3                           1.26.7      HTTP library with thread-safe connection pooling, file post, and more.
uvicorn                           0.15.0      The lightning-fast ASGI server.
validators                        0.18.2      Python Data Validation for Humans™.
virtualenv                        20.10.0     Virtual Python Environment builder
visualdl                          2.2.2       Visualize Deep Learning
wand                              0.6.7       Ctypes-based simple MagickWand API binding for Python
wcwidth                           0.2.5       Measures the displayed width of unicode strings in a terminal
webencodings                      0.5.1       Character encoding aliases for legacy web content
werkzeug                          2.0.2       The comprehensive WSGI web application library.
widgetsnbextension                3.5.2       IPython HTML widgets for Jupyter
zipp                              3.6.0       Backport of pathlib-compatible object wrapper for zip files

I think the difference is the doc is asking to install 0.0.0 where my installation is 0.3.2. Is it a hard requirement to have it as 0.0.0?

Here is the dependencies list from pyproject.toml in case you need it

[tool.poetry.dependencies]
python = "^3.8"

# OCR
# layoutparser used by paddleocr ppstructure needs it
layoutparser = "^0.3.2"
paddlepaddle = "^2.1.3"
paddleocr = ">=2.0.1"

# Web
fastapi = "^0.68.1"
uvicorn = "^0.15.0"
python-multipart = "^0.0.5"

#Image
Pillow = "^8.3.2"

# Building interactive app
streamlit = "^1.2.0"
felixgao commented 2 years ago

looking at the source code https://github.com/Layout-Parser/layout-parser/blob/c0044a08da7a630e2241348e597a08ba6aa87ba1/src/layoutparser/models/paddledetection/layoutmodel.py#L141-L155

I think the layoutparser have updated their code to put threshold, thread_num and enable_mkldnn to a new dict called extra_config

In version 0.3.2 they also changed the model's config_path to be lp://PubLayNet/ppyolov2_r50vd_dcn_365e/config instead of lp://PubLayNet/ppyolov2_r50vd_dcn_365e_publaynet/config

cctsong commented 2 years ago

I used poetry to manage my dependencies and it seems to be installed fine.

poetry show                        
altair                            4.1.0       Altair: A declarative statistical visualization library for Python.
appnope                           0.1.2       Disable App Nap on macOS >= 10.9
argon2-cffi                       21.1.0      The secure Argon2 password hashing algorithm.
asgiref                           3.4.1       ASGI specs, helper code, and adapters
astor                             0.8.1       Read/rewrite/write Python ASTs
attrs                             21.2.0      Classes Without Boilerplate
babel                             2.9.1       Internationalization utilities
backcall                          0.2.0       Specifications for callback functions passed in to an API
backports.entry-points-selectable 1.1.1       Compatibility shim providing selectable entry points for older implementa...
backports.zoneinfo                0.2.1       Backport of the standard library zoneinfo module
base58                            2.1.1       Base58 and Base58Check implementation.
bce-python-sdk                    0.8.62      BCE SDK for python
bleach                            4.1.0       An easy safelist-based HTML-sanitizing tool.
blinker                           1.4         Fast, simple object-to-object and broadcast signaling
cachetools                        4.2.4       Extensible memoizing collections and decorators
certifi                           2021.10.8   Python package for providing Mozilla's CA Bundle.
cffi                              1.15.0      Foreign Function Interface for Python calling C code.
cfgv                              3.3.1       Validate configuration and produce human readable error messages.
chardet                           4.0.0       Universal encoding detector for Python 2 and 3
charset-normalizer                2.0.7       The Real First Universal Charset Detector. Open, modern and actively main...
click                             7.1.2       Composable command line interface toolkit
cssselect                         1.1.0       cssselect parses CSS3 Selectors and translates them to XPath 1.0
cssutils                          2.3.0       A CSS Cascading Style Sheets library for Python
cycler                            0.11.0      Composable style cycles
debugpy                           1.5.1       An implementation of the Debug Adapter Protocol for Python
decorator                         5.1.0       Decorators for Humans
defusedxml                        0.7.1       XML bomb protection for Python stdlib modules
distlib                           0.3.3       Distribution utilities
entrypoints                       0.3         Discover and load entry points from installed packages.
et-xmlfile                        1.1.0       An implementation of lxml.xmlfile for the standard library
fastapi                           0.68.2      FastAPI framework, high performance, easy to learn, fast to code, ready f...
filelock                          3.3.2       A platform independent file lock.
flake8                            4.0.1       the modular source code checker: pep8 pyflakes and co
flask                             2.0.2       A simple framework for building complex web applications.
flask-babel                       2.0.0       Adds i18n/l10n support to Flask applications
future                            0.18.2      Clean single-source support for Python 3 and 2
gitdb                             4.0.9       Git Object Database
gitpython                         3.1.24      GitPython is a python library used to interact with Git repositories
h11                               0.12.0      A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
identify                          2.3.5       File identification library for Python
idna                              3.3         Internationalized Domain Names in Applications (IDNA)
imageio                           2.10.4      Library for reading and writing a wide range of image, video, scientific,...
imgaug                            0.4.0       Image augmentation library for deep neural networks
importlib-resources               5.4.0       Read resources from Python packages
iopath                            0.1.9       A library for providing I/O abstraction.
ipykernel                         6.5.0       IPython Kernel for Jupyter
ipython                           7.29.0      IPython: Productive Interactive Computing
ipython-genutils                  0.2.0       Vestigial utilities from IPython
ipywidgets                        7.6.5       IPython HTML widgets for Jupyter
itsdangerous                      2.0.1       Safely pass data to untrusted environments and back.
jedi                              0.18.0      An autocompletion tool for Python that can be used for text editors.
jinja2                            3.0.3       A very fast and expressive template engine.
jsonschema                        4.2.1       An implementation of JSON Schema validation for Python
jupyter-client                    7.0.6       Jupyter protocol implementation and client libraries
jupyter-core                      4.9.1       Jupyter core package. A base package on which Jupyter projects rely.
jupyterlab-pygments               0.1.2       Pygments theme using JupyterLab CSS variables
jupyterlab-widgets                1.0.2       A JupyterLab extension.
kiwisolver                        1.3.2       A fast implementation of the Cassowary constraint solver
layoutparser                      0.3.2       A unified toolkit for Deep Learning Based Document Image Analysis
lmdb                              1.2.1       Universal Python binding for the LMDB 'Lightning' Database
lxml                              4.6.4       Powerful and Pythonic XML processing library combining libxml2/libxslt wi...
markupsafe                        2.0.1       Safely add untrusted strings to HTML/XML markup.
matplotlib                        3.4.3       Python plotting package
matplotlib-inline                 0.1.3       Inline Matplotlib backend for Jupyter
mccabe                            0.6.1       McCabe checker, plugin for flake8
mistune                           0.8.4       The fastest markdown parser in pure Python
nbclient                          0.5.8       A client library for executing notebooks. Formerly nbconvert's ExecutePre...
nbconvert                         6.3.0       Converting Jupyter Notebooks
nbformat                          5.1.3       The Jupyter Notebook format
nest-asyncio                      1.5.1       Patch asyncio to allow nested event loops
networkx                          2.6.3       Python package for creating and manipulating graphs and networks
nodeenv                           1.6.0       Node.js virtual environment builder
notebook                          6.4.5       A web-based notebook environment for interactive computing
numpy                             1.21.1      NumPy is the fundamental package for array computing with Python.
opencv-contrib-python             4.4.0.46    Wrapper package for OpenCV python bindings.
opencv-python                     4.5.3.56    Wrapper package for OpenCV python bindings.
openpyxl                          3.0.9       A Python library to read/write Excel 2010 xlsx/xlsm files
packaging                         21.2        Core utilities for Python packages
paddleocr                         2.3.0.1     Awesome OCR toolkits based on PaddlePaddle (8.6M ultra-lightweight pre-tr...
paddlepaddle                      2.2.0       Parallel Distributed Deep Learning
pandas                            1.3.4       Powerful data structures for data analysis, time series, and statistics
pandocfilters                     1.5.0       Utilities for writing pandoc filters in python
parso                             0.8.2       A Python Parser
pdf2image                         1.16.0      A wrapper around the pdftoppm and pdftocairo command line tools to conver...
pdfminer.six                      20200517    PDF parser and analyzer
pdfplumber                        0.5.28      Plumb a PDF for detailed information about each char, rectangle, and line.
pexpect                           4.8.0       Pexpect allows easy control of interactive console applications.
pickleshare                       0.7.5       Tiny 'shelve'-like database with concurrency support
pillow                            8.4.0       Python Imaging Library (Fork)
platformdirs                      2.4.0       A small Python module for determining appropriate platform-specific dirs,...
portalocker                       2.3.2       Wraps the portalocker recipe for easy usage
pre-commit                        2.15.0      A framework for managing and maintaining multi-language pre-commit hooks.
premailer                         3.10.0      Turns CSS blocks into style attributes
prometheus-client                 0.12.0      Python client for the Prometheus monitoring system.
prompt-toolkit                    3.0.22      Library for building powerful interactive command lines in Python
protobuf                          3.19.1      Protocol Buffers
ptyprocess                        0.7.0       Run a subprocess in a pseudo terminal
pyarrow                           6.0.0       Python library for Apache Arrow
pyclipper                         1.3.0       Cython wrapper for the C++ translation of the Angus Johnson's Clipper lib...
pycodestyle                       2.8.0       Python style guide checker
pycparser                         2.21        C parser in Python
pycryptodome                      3.11.0      Cryptographic library for Python
pydantic                          1.8.2       Data validation and settings management using python 3.6 type hinting
pydeck                            0.7.1       Widget for deck.gl maps
pyflakes                          2.4.0       passive checker of Python programs
pygments                          2.10.0      Pygments is a syntax highlighting package written in Python.
pympler                           0.9         A development tool to measure, monitor and analyze the memory behavior of...
pyparsing                         2.4.7       Python parsing module
pyrsistent                        0.18.0      Persistent/Functional/Immutable data structures
python-dateutil                   2.8.2       Extensions to the standard Python datetime module
python-levenshtein                0.12.2      Python extension for computing string edit distances and similarities.
python-multipart                  0.0.5       A streaming multipart parser for Python
pytz                              2021.3      World timezone definitions, modern and historical
pytz-deprecation-shim             0.1.0.post0 Shims to make deprecation of pytz easier
pywavelets                        1.2.0       PyWavelets, wavelet transform module
pyyaml                            6.0         YAML parser and emitter for Python
pyzmq                             22.3.0      Python bindings for 0MQ
requests                          2.26.0      Python HTTP for Humans.
scikit-image                      0.17.2      Image processing in Python
scipy                             1.6.1       SciPy: Scientific Library for Python
send2trash                        1.8.0       Send file to trash natively under Mac OS X, Windows and Linux.
shapely                           1.8.0       Geometric objects, predicates, and operations
shellcheck-py                     0.8.0.1     Python wrapper around invoking shellcheck (https://www.shellcheck.net/)
six                               1.16.0      Python 2 and 3 compatibility utilities
smmap                             5.0.0       A pure Python implementation of a sliding window memory map manager
sortedcontainers                  2.4.0       Sorted Containers -- Sorted List, Sorted Dict, Sorted Set
starlette                         0.14.2      The little ASGI library that shines.
streamlit                         1.2.0       The fastest way to build data apps in Python
terminado                         0.12.1      Tornado websocket backend for the Xterm.js Javascript terminal emulator l...
testpath                          0.5.0       Test utilities for code working with files and commands
tifffile                          2021.11.2   Read and write TIFF files
toml                              0.10.2      Python Library for Tom's Obvious, Minimal Language
toolz                             0.11.2      List processing tools and functional utilities
tornado                           6.1         Tornado is a Python web framework and asynchronous networking library, or...
tqdm                              4.62.3      Fast, Extensible Progress Meter
traitlets                         5.1.1       Traitlets Python configuration system
typing-extensions                 4.0.0       Backported and Experimental Type Hints for Python 3.6+
tzdata                            2021.5      Provider of IANA time zone data
tzlocal                           4.1         tzinfo object for the local timezone
urllib3                           1.26.7      HTTP library with thread-safe connection pooling, file post, and more.
uvicorn                           0.15.0      The lightning-fast ASGI server.
validators                        0.18.2      Python Data Validation for Humans™.
virtualenv                        20.10.0     Virtual Python Environment builder
visualdl                          2.2.2       Visualize Deep Learning
wand                              0.6.7       Ctypes-based simple MagickWand API binding for Python
wcwidth                           0.2.5       Measures the displayed width of unicode strings in a terminal
webencodings                      0.5.1       Character encoding aliases for legacy web content
werkzeug                          2.0.2       The comprehensive WSGI web application library.
widgetsnbextension                3.5.2       IPython HTML widgets for Jupyter
zipp                              3.6.0       Backport of pathlib-compatible object wrapper for zip files

I think the difference is the doc is asking to install 0.0.0 where my installation is 0.3.2. Is it a hard requirement to have it as 0.0.0?

Here is the dependencies list from pyproject.toml in case you need it

[tool.poetry.dependencies]
python = "^3.8"

# OCR
# layoutparser used by paddleocr ppstructure needs it
layoutparser = "^0.3.2"
paddlepaddle = "^2.1.3"
paddleocr = ">=2.0.1"

# Web
fastapi = "^0.68.1"
uvicorn = "^0.15.0"
python-multipart = "^0.0.5"

#Image
Pillow = "^8.3.2"

# Building interactive app
streamlit = "^1.2.0"
cctsong commented 2 years ago

layoutparser 安装 0.0.0 应该就ok了,0.3.2的确会有这类报错

felixgao commented 2 years ago

change to version to 0.0.0 poetry doesn't resolve any verions.

poetry lock                                     
Updating dependencies
Resolving dependencies... (2.4s)

  SolverProblemError

  Because paddle-paddle depends on layoutparser (0.0.0) which doesn't match any versions, version solving failed.