extractnet icon indicating copy to clipboard operation
extractnet copied to clipboard

undefined symbol: deflateInit2_ on debian 11

Open info2000 opened this issue 2 years ago • 5 comments

When try to import extractnet library, on debian 11 with python 3.8 (fastapi docker image) I'm having this error

File "/usr/local/lib/python3.8/site-packages/extractnet/__init__.py", line 1, in <module>
    from extractnet.pipeline import Extractor
  File "/usr/local/lib/python3.8/site-packages/extractnet/pipeline.py", line 10, in <module>
    from .nn_models import NewsNet
  File "/usr/local/lib/python3.8/site-packages/extractnet/nn_models.py", line 7, in <module>
    from .blocks import TagCountReadabilityBlockifier
ImportError: /usr/local/lib/python3.8/site-packages/extractnet/blocks.cpython-38-x86_64-linux-gnu.so: undefined symbol: deflateInit2_

I had the zlib library installed, what could be the issue?

info2000 avatar Jun 12 '22 20:06 info2000

Seems like the issue is that Cython's modules are only compiled for OS X, so what you can do is clone the project, install the dev requirements and them just run make install, this will re-compile Cython's modules and then you'll be able to use the library.

BTW, make sure you have installed libxml2-dev in your system before running the make command.

carlosrokk3r avatar Jun 23 '22 23:06 carlosrokk3r

I'm getting a similar issue, however it's only occurring on github actions. when I try to run it locally in the WSL using ubuntu it works fine. I'm not sure how to implement this fix to run in github however. do you have any thoughts?

dan100110 avatar Aug 15 '22 21:08 dan100110

Same issue on Ubuntu

merionum avatar Nov 04 '22 12:11 merionum

any resolutions??? cant get it to run on macos docker, or amazon linux, just want to put this into a lambda function but even the package itself is too big to fit into a zip...

DoctorSlimm avatar Feb 22 '23 13:02 DoctorSlimm

For fix see https://github.com/currentslab/extractnet/issues/16#issuecomment-1869034732 and #18 PR.

vgavro avatar Dec 25 '23 15:12 vgavro