question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import Python pulsar-client==2.4.2 on Mac Os Catalina 10.15.2

See original GitHub issue

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/protobuf@2.6/lib/libprotobuf-lite.9.dylib

To Reproduce Steps to reproduce the behavior:

  1. Run:
# 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/protobuf@2.6/lib/libprotobuf-lite.9.dylib
  Referenced from: /tmp/check/.venv/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so
  Reason: image not found
  1. See the error

Desktop (please complete the following information):

  • OS: Catalina 10.15.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
sijiecommented, Jan 16, 2020

@bry00 can you try install protobuf and zstd?

brew install zstd protobuf
0reactions
Dcepcommented, Apr 4, 2020

@bry00 can you try install protobuf and zstd?

brew install zstd protobuf

Fixed my issue with same error with pulsar-client==2.5.0 & OSX 10.13.6

Read more comments on GitHub >

github_iconTop Results From Across the Web

Catalina and Python Package Problems - Apple Developer
I'm using an admin account. If I can't install common python packages, I can't get a useable implementation of python3 on Catalina. This...
Read more >
Modules are installed using pip on OSX but not found when ...
Solution. Install pip again specifying the destination of the modules that will be installed. This must be the destination for the system/default python....
Read more >
MongoDB doesn't work after update to macOS Catalina 10.15
I updated to Catalina 10.15.2 from 10.14.X and the new security failed to recognize mongo as a trusted developer. Trying to run mongod...
Read more >
Issue 38946: IDLE on macOS 10.15 Catalina does not open ...
I'm running Python 3.8 and Mac Os Catalina 10.15.1 When I click a .py file, it will open the shell + editor, However...
Read more >
How to Fix Common Problems in macOS Catalina - MacKeeper
If you're running an outdated version of the operating system, performing a software update could resolve some issues. Currently, the latest ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found