Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Pulsar-Client: Import error with Python 3.10 #15477

Closed
b0mbays opened this issue May 6, 2022 · 13 comments
Closed

Python Pulsar-Client: Import error with Python 3.10 #15477

b0mbays opened this issue May 6, 2022 · 13 comments
Labels
Stale type/bug The PR fixed a bug or issue reported a bug

Comments

@b0mbays
Copy link

b0mbays commented May 6, 2022

Describe the bug
Hi, we're experiencing an import error when using Python 3.10 on OSX 11 and 12. We're installing the python pulsar-client-2.10.0 and having the same error on two machines:

  File "my-username/my-file", line 33, in <module>
    sys.exit(load_entry_point('my-entrypoint', 'console_scripts')())
  File "my-username/my-file", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "my-username/my-file", line 7, in <module>
    from my-package import runner
  File "my-username/my-file", line 5, in <module>
    from setup import Setup
  File "my-username/my-file", line 17, in <module>
    from packages.pulsar.pulsar_client import Pulsar  # noqa: F401
  File "my-username/my-file", line 8, in <module>
    from pulsar import MessageId, Timeout, ConnectError, ConsumerType
  File "/my-directory/lib/python3.10/site-packages/pulsar/__init__.py", line 103, in <module>
    import _pulsar
ImportError: dlopen(/my-directory/lib/python3.10/site-packages/_pulsar.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN5boost6python6detail13current_scopeE'

If we switch to Python 3.8 or 3.9 this issue is resolved but we would really like to use python 3.10.

Thank you

@gus-maurizio
Copy link

It works with version 3.8 from brew, but fails with 3.10.

@b0mbays
Copy link
Author

b0mbays commented May 10, 2022

It works with version 3.8 from brew, but fails with 3.10.

Are you seeing the same error on your machine as well?

@gus-maurizio
Copy link

yes, same exact error. I switched to 3.8.x (whatever brew installed) and the problems went away. My guess is that the library is somehow missing for 3.10. _pulsar.cpython-310-darwin.so
Works in 3.9 as well. so seems the problem is limited to 3.10 version of python.

@gus-maurizio
Copy link

Actually the library is indeed there: /usr/local/lib/python3.10/site-packages/_pulsar.cpython-310-darwin.so but it lacks some linked modules: Symbol not found: __ZN5boost6python6detail13current_scopeE

@gus-maurizio
Copy link

so if the powers that be can relink it it might solve the issue.

@b0mbays
Copy link
Author

b0mbays commented May 11, 2022

yes, same exact error. I switched to 3.8.x (whatever brew installed) and the problems went away. My guess is that the library is somehow missing for 3.10. _pulsar.cpython-310-darwin.so Works in 3.9 as well. so seems the problem is limited to 3.10 version of python.

Which Python 3.9 version are you using? When using Python 3.9.7 and pulsar-client 2.10.0 (or 2.9.2) i'm getting:

segmentation fault

Thanks!

@github-actions
Copy link

The issue had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Jun 11, 2022
@armangurkan
Copy link

having the same issue

@github-actions github-actions bot removed the Stale label Aug 13, 2022
@github-actions
Copy link

The issue had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Sep 12, 2022
@tisonkun
Copy link
Member

I think it's because we didn't release wheel for cpython 3.10. cc @codelipenghui @BewareMyPower

@BewareMyPower
Copy link
Contributor

@tisonkun Yes. And the Python wheels of new versions (2.10.1+, 2.11.0+) for macOS are still blocked, see #17468

@github-actions
Copy link

The issue had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Oct 13, 2022
@tisonkun
Copy link
Member

Work for me with Python 3.10 and Pulsar Python Client 2.10.1.

The development of the Python client has been permanently moved to https://github.com/apache/pulsar-client-python. If it's still relevant, please open an issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

No branches or pull requests

5 participants