Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: undefined symbol: deflateInit2_ #16

Open
midstreeeam opened this issue Jun 27, 2023 · 3 comments
Open

ImportError: undefined symbol: deflateInit2_ #16

midstreeeam opened this issue Jun 27, 2023 · 3 comments

Comments

@midstreeeam
Copy link

Using python3.10 and got importError

Traceback (most recent call last):
  File "/home/midstream/git/peduncle/test.py", line 1, in <module>
    from extractnet import Extractor
  File "/home/midstream/.local/lib/python3.10/site-packages/extractnet/__init__.py", line 1, in <module>
    from extractnet.pipeline import Extractor
  File "/home/midstream/.local/lib/python3.10/site-packages/extractnet/pipeline.py", line 10, in <module>
    from .nn_models import NewsNet
  File "/home/midstream/.local/lib/python3.10/site-packages/extractnet/nn_models.py", line 7, in <module>
    from .blocks import TagCountReadabilityBlockifier
ImportError: /home/midstream/.local/lib/python3.10/site-packages/extractnet/blocks.cpython-310-x86_64-linux-gnu.so: undefined symbol: deflateInit2_
@vgavro
Copy link

vgavro commented Dec 25, 2023

Same using python3.8:

In [1]: import extractnet
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 1
----> 1 import extractnet

File ~/work/X/venv38/lib/python3.8/site-packages/extractnet/__init__.py:1
----> 1 from extractnet.pipeline import Extractor
      3 __version__ = '2.0.7'
      6 _LOADED_MODELS = {}

File ~/work/X/venv38/lib/python3.8/site-packages/extractnet/pipeline.py:10
      8 from .compat import unicode_
      9 from .util import priority_merge, get_module_res, remove_empty_keys, attribute_sanity_check
---> 10 from .nn_models import NewsNet
     11 from .name_crf import AuthorExtraction
     12 from .nn_models import NewsNet

File ~/work/X/venv38/lib/python3.8/site-packages/extractnet/nn_models.py:7
      5 from .compat import str_cast
      6 from .util import get_and_union_features, get_module_res, fix_encoding
----> 7 from .blocks import TagCountReadabilityBlockifier
      9 EMPTY_HTML = "<article><p>content</p><p>blocked</p><p>404</p></article>"
     11 class NewsNet():

ImportError: /home/vgavro/work/X/venv38/lib/python3.8/site-packages/extractnet/blocks.cpython-38-x86_64-linux-gnu.so: undefined symbol: deflateInit2_

@vgavro
Copy link

vgavro commented Dec 25, 2023

UPD: looks like pre-compiled libraries published on pypi and used from pypi install are not working on all linux systems because builded with shared libraries, you need to build package yourself, but build system was also broken.
see #18 merge request, until merged use command below to install:

./venv/bin/pip install --upgrade 'git+https://github.com/vgavro/extractnet@fix/pip_build'

@kungfucop
Copy link

UPD: looks like pre-compiled libraries published on pypi and used from pypi install are not working on all linux systems because builded with shared libraries, you need to build package yourself, but build system was also broken. see #18 merge request, until merged use command below to install:

./venv/bin/pip install --upgrade 'git+https://github.com/vgavro/extractnet@fix/pip_build'

this works for me, thanks! Also I installed g++ libxml2-dev git to make the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants