Pulsar: macOS 10.15 support

Created on 24 Oct 2019  路  9Comments  路  Source: apache/pulsar

Describe the bug
pip install pulsar-client==2.4.1 on macOS 10.15 results in:
ImportError: dlopen(/Users/ericnielson/venv/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/protobuf/lib/libprotobuf-lite.20.dylib
Referenced from: /Users/ericnielson/venv/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so
Reason: image not found

To Reproduce
Steps to reproduce the behavior:

  1. on macOS 10.15 $ pip install pulsar-client==2.4.1
  2. Write .py with "import pulsar"
  3. Try to run
  4. See error

Expected behavior
i would expect this to run

output from pip install:
ericnielson:~ ericnielson$ pip install pulsar-client==2.4.1
Requirement already satisfied: pulsar-client==2.4.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (2.4.1)
Requirement already satisfied: certifi in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pulsar-client==2.4.1) (2018.11.29)
Requirement already satisfied: protobuf>=3.6.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pulsar-client==2.4.1) (3.10.0)
Requirement already satisfied: prometheus-client in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pulsar-client==2.4.1) (0.7.1)
Requirement already satisfied: six in ./Library/Python/3.7/lib/python/site-packages (from pulsar-client==2.4.1) (1.11.0)
Requirement already satisfied: apache-bookkeeper-client>=4.9.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pulsar-client==2.4.1) (4.9.2)
Requirement already satisfied: grpcio in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pulsar-client==2.4.1) (1.18.0)
Requirement already satisfied: ratelimit in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pulsar-client==2.4.1) (2.2.1)
Requirement already satisfied: fastavro in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pulsar-client==2.4.1) (0.22.5)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from protobuf>=3.6.1->pulsar-client==2.4.1) (40.6.2)
Requirement already satisfied: pytz in ./Library/Python/3.7/lib/python/site-packages (from apache-bookkeeper-client>=4.9.2->pulsar-client==2.4.1) (2018.9)
Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in ./Library/Python/3.7/lib/python/site-packages (from apache-bookkeeper-client>=4.9.2->pulsar-client==2.4.1) (2.22.0)
Requirement already satisfied: pymmh3>=0.0.3 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from apache-bookkeeper-client>=4.9.2->pulsar-client==2.4.1) (0.0.5)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests<3.0.0dev,>=2.18.0->apache-bookkeeper-client>=4.9.2->pulsar-client==2.4.1) (1.24.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests<3.0.0dev,>=2.18.0->apache-bookkeeper-client>=4.9.2->pulsar-client==2.4.1) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in ./Library/Python/3.7/lib/python/site-packages (from requests<3.0.0dev,>=2.18.0->apache-bookkeeper-client>=4.9.2->pulsar-client==2.4.1) (2.7)

triagweek-43 typbug

Most helpful comment

@sijie -- good point; I upgraded protobuf and this fixed the problem for me!

==> Upgrading protobuf 3.7.1 -> 3.11.4

All 9 comments

the packages published are for mac os 10.14, will try to publish osx 10.15 packages next release.

Any doc / repo that would help us build this package locally and unblock devs having up to date OSX laptops ?

EDIT: alternative = use docker:

docker run -it --name pulsar-client --network=host apachepulsar/pulsar /bin/bash

And then push your python code to the docker image and run it from there to connect to your local standalone pulsar instance using "host.docker.internal:6650".
Later you can come back to that container using docker start -a pulsar-client

Can you confirm if this problem still exists in 2.4.2 or 2.5.0 releases?

This just happened for me with pulsar 2.5.0.

ImportError: dlopen(/Users/....../.venv/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/protobuf/lib/libprotobuf-lite.22.dylib
  Referenced from: /Users/....../.venv/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so
  Reason: image not found

Edit: I realize on this laptop, I'm actually still running 10.14.3 (but seeing same error).

@hozn Can you check what version of protobuf you installed?

If you are using brew, you can find it via brew versions protobuf

@sijie -- good point; I upgraded protobuf and this fixed the problem for me!

==> Upgrading protobuf 3.7.1 -> 3.11.4

Close this issue because we have started publishing python client 10.15 since 2.4.2 release.

Was this page helpful?
0 / 5 - 0 ratings