brotlicffi icon indicating copy to clipboard operation
brotlicffi copied to clipboard

Symbol not found: _BrotliDecoderCreateInstance with Python 3.7.2 and fresh pip install

Open pirate opened this issue 6 years ago • 3 comments

There seems to be something preventing brotlipy from working on my machine:

$ pip --version
pip 19.0.1
$ virtualenv -p $(which python3.7) venv
$ source venv/bin/activate
$ python --version
Python 3.7.2
$ pip install --no-deps --no-binary :all: --ignore-installed brotlipy
Collecting brotlipy
  Using cached https://files.pythonhosted.org/packages/d9/91/bc79b88590e4f662bd40a55a2b6beb0f15da4726732efec5aa5a3763d856/brotlipy-0.7.0.tar.gz
Skipping bdist_wheel for brotlipy, due to binaries being disabled for it.
Installing collected packages: brotlipy
  Running setup.py install for brotlipy ... done
Successfully installed brotlipy-0.7.0
$ python
>>> import brotli
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/test/venv/lib/python3.7/site-packages/brotli/__init__.py", line 3, in <module>
    from .brotli import (
  File "~/test/venv/lib/python3.7/site-packages/brotli/brotli.py", line 5, in <module>
    from ._brotli import ffi, lib
ImportError: dlopen(~/test/venv/lib/python3.7/site-packages/brotli/_brotli.abi3.so, 2): Symbol not found: _BrotliDecoderCreateInstance
  Referenced from: ~/test/venv/lib/python3.7/site-packages/brotli/_brotli.abi3.so
  Expected in: flat namespace
 in ~/test/venv/lib/python3.7/site-packages/brotli/_brotli.abi3.so

This also happens with just plain pip install brotlipy (without the --no-deps --no-binary :all: --ignore-installed options).

pirate avatar Feb 06 '19 08:02 pirate

same error

kukat avatar Jun 25 '19 05:06 kukat

IIRC @ikreymer just ended up disabling brotli support in pywb when this error is encountered, so unfortunately I don't know of any workaround at the moment @kukat. Please post back if you do find a way to fix this!

pirate avatar Jun 28 '19 20:06 pirate

I use anaconda py3.6 / ubuntu The finial solution apt-get install python3-cffi-backend

paucky avatar Jul 04 '20 14:07 paucky