Describe the bug
With correctly installed libpulsar and protobuf and pulsar-client 2.4.2 cannot import pulsar on Python 3.7.5. An attempt to import raises ImportError: dlopen(/tmp/check/.venv/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/[email protected]/lib/libprotobuf-lite.9.dylib
To Reproduce
Steps to reproduce the behavior:
# python3 -V
Python 3.7.5
# python3
Python 3.7.5 (default, Dec 12 2019, 09:41:03)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pulsar
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/check/.venv/lib/python3.7/site-packages/pulsar/__init__.py", line 102, in <module>
import _pulsar
ImportError: dlopen(/tmp/check/.venv/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/[email protected]/lib/libprotobuf-lite.9.dylib
Referenced from: /tmp/check/.venv/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so
Reason: image not found
Desktop (please complete the following information):
@sijie is helping on this 2.4.2 version.
I don't think we publish the client for 10.15. we only have vagrant images to build 10.12, 10.13 and 10.14. We will have to figure out a plan for 10.15.
@bry00 we have just published 2.4.2 python client for osx 10.15. Can you try it again?
@bry00 we have just published 2.4.2 python client for osx 10.15. Can you try it again?
It does not work yet:
# python3
Python 3.7.5 (default, Dec 12 2019, 09:41:03)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pulsar
Segmentation fault: 11
@bry00 can you try install protobuf and zstd?
brew install zstd protobuf
@bry00 can you try install
protobufandzstd?brew install zstd protobuf
(venv) # brew install zstd protobuf
(...)
Warning: zstd 1.4.4 is already installed and up-to-date
To reinstall 1.4.4, run `brew reinstall zstd`
Warning: protobuf 3.11.2 is already installed and up-to-date
To reinstall 3.11.2, run `brew reinstall protobuf`
(venv) # python3 -V
Python 3.7.5
(venv) # pip install pulsar-client --upgrade
(...)
Collecting pulsar-client
Downloading Installing collected packages: pulsar-client
Found existing installation: pulsar-client 2.4.2
Uninstalling pulsar-client-2.4.2:
Successfully uninstalled pulsar-client-2.4.2
Successfully installed pulsar-client-2.5.0
(venv) # python3
Python 3.7.5 (default, Dec 12 2019, 09:41:03)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pulsar
Segmentation fault: 11
(venv) #
I've succeed with installing and using pulsar-client==2.5.0 using regular (brew not pyenv) Python 3.7.6 installation.
It seems, that this segmentation fault is caused by some incompatibility ofpulsar-client with pyenv, but it would be another issue.
I close this issue.
@bry00 can you try install
protobufandzstd?brew install zstd protobuf
Fixed my issue with same error with pulsar-client==2.5.0 & OSX 10.13.6
Most helpful comment
@bry00 can you try install
protobufandzstd?