camelot-dev / camelot

A Python library to extract tabular data from PDFs
https://camelot-py.readthedocs.io
MIT License
2.96k stars 466 forks source link

Does it support python 3.11? #362

Closed Tobeabellwether closed 1 year ago

Tobeabellwether commented 1 year ago

Describe the bug

Dear camelot team, when I use poetry to add "camelot-py[base]", I found that installation for pdftopng failed, it raised the error: Unable to find installation for pdftopng(0.2.3), I'm using python 3.11. Thanks

rossettistone commented 1 year ago

Seems like this is caused by pdftopng not having a 3.11 (or 3.10) build. https://github.com/vinayak-mehta/pdftopng/issues/11

Last commit on pdftopng was back in 2021, so it seems unlikely that this'll be fixed on their end soon.

I'm sorry to say I don't have a workaround. Just providing the above info for others stumbling on this issue.

maxkeiko commented 1 year ago

"camelot-py[base]" seems not working for me as well.

But it works with "camelot-py" in python 3.11 in Windows.

Besides, "opencv-python" package should be also needed.

aoyono commented 1 year ago

I think I found a workaround for pdftopng v0.2.3, which can be used to workaround any install issue with camelot as well. In my case, I couldn't install it on Python 3.11 with the "[cv]" extra. The workaround below solved it:

  1. Apply this workaround for pdftopng (disclaimer: I am the author)
  2. Once pdftopng is installed, you can install camelot-py with the [cv] extra: python3 -m pip install "camelot-py[cv]==0.11.0"
foarsitter commented 1 year ago

See https://github.com/camelot-dev/camelot/issues/394 for details.