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.

Describe the bug I’m unable to import the pulsar Python library.

→ uname -a
Darwin ryoung-mbp.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64

→ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.5
BuildVersion:   19F101

→ python -V
Python 3.7.7

→ pip show pulsar-client
Name: pulsar-client
Version: 2.6.0
Summary: Apache Pulsar Python client library
Home-page: https://pulsar.apache.org/
Author: Pulsar Devs
Author-email: dev@pulsar.apache.org
License: Apache License v2.0
Location: /Users/ryoung/.pyenv/versions/3.7.7/envs/default3/lib/python3.7/site-packages
Requires: six, apache-bookkeeper-client, protobuf, ratelimit, prometheus-client, certifi, grpcio, fastavro
Required-by:

To Reproduce Simply run python and then import pulsar.

→ python
Python 3.7.7 (default, May 20 2020, 15:06:47)
[Clang 11.0.3 (clang-1103.0.32.59)] 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 "/Users/ryoung/.pyenv/versions/default3/lib/python3.7/site-packages/pulsar/__init__.py", line 102, in <module>
    import _pulsar
ImportError: dlopen(/Users/ryoung/.pyenv/versions/default3/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so, 2): Symbol not found: __Py_tracemalloc_config
  Referenced from: /Users/ryoung/.pyenv/versions/default3/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so
  Expected in: flat namespace
 in /Users/ryoung/.pyenv/versions/default3/lib/python3.7/site-packages/_pulsar.cpython-37m-darwin.so
>>>

Expected behavior I expect the pulsar python client to work following the Install using pip documentation.

Desktop (please complete the following information):

  • OS: Mac 10.15.5 (19F101)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
wolfstudycommented, Oct 10, 2020

In 2.6.2, we have fixed this problem, if you want to use it in 2.6.1, please upgrade the python version to 3.8.3.

Will close this issue.

2reactions
dowstreetcommented, Jun 25, 2020

I ran into this same problem yesterday, and can confirm that upgrading from the latest Homebrew Python v3.7 to Python 3.8.3 from python.org resolved it.

https://www.python.org/ftp/python/3.8.3/python-3.8.3-macosx10.9.pkg


$ uname -a
Darwin ds-macbook-pro.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.5
BuildVersion:   19F101

$ python3 -V
Python 3.8.3

$ pip show pulsar-client
Name: pulsar-client
Version: 2.6.0
Summary: Apache Pulsar Python client library
Home-page: https://pulsar.apache.org/
Author: Pulsar Devs
Author-email: dev@pulsar.apache.org
License: Apache License v2.0
Location: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
Requires: fastavro, certifi, apache-bookkeeper-client, prometheus-client, protobuf, grpcio, six, ratelimit
Required-by: 

$ python3
Python 3.8.3 (v3.8.3:6f8c8320e9, May 13 2020, 16:29:34)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pulsar

Read more comments on GitHub >

github_iconTop Results From Across the Web

Darwin (operating system) - Wikipedia
Darwin forms the Unix-based core set of components upon which macOS (previously OS X and Mac OS X), iOS, watchOS, tvOS, iPadOS and...
Read more >
Why is macOS often referred to as 'Darwin'? - Ask Different
Now, back to Darwin: Darwin is basically the underpinnings of macOS, from the xnu kernel, IOKit, drivers, etc. up to the BSD libraries...
Read more >
What is Darwin OS? Why is macOS often referred to as Darwin?
Darwin is an open-source operating system of Apple Inc. which acts as the base for the macOS. Darwin consists of different technologies like...
Read more >
PureDarwin | Moving the Darwin community in the right ...
Darwin is the open source operating system from Apple that forms the base for macOS. PureDarwin is a community project that aims to...
Read more >
Darwin - GitHub
XNU kernel is part of the Darwin operating system for use in macOS and iOS operating systems. XNU is an acronym for X...
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