Repository navigation
Closed
Description
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
Reacted by 子沐时空
Activity
gus-maurizio commentedon May 10, 2022
It works with version 3.8 from brew, but fails with 3.10.
b0mbays commentedon May 10, 2022
Are you seeing the same error on your machine as well?
gus-maurizio commentedon May 10, 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.soWorks in 3.9 as well. so seems the problem is limited to 3.10 version of python.
gus-maurizio commentedon May 10, 2022
Actually the library is indeed there:
/usr/local/lib/python3.10/site-packages/_pulsar.cpython-310-darwin.sobut it lacks some linked modules:Symbol not found: __ZN5boost6python6detail13current_scopeEgus-maurizio commentedon May 10, 2022
so if the powers that be can relink it it might solve the issue.
b0mbays commentedon May 11, 2022
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 faultThanks!
github-actions commentedon Jun 11, 2022
The issue had no activity for 30 days, mark with Stale label.
armangurkan commentedon Aug 13, 2022
having the same issue
github-actions commentedon Sep 12, 2022
The issue had no activity for 30 days, mark with Stale label.
tisonkun commentedon Sep 12, 2022
I think it's because we didn't release wheel for cpython 3.10. cc @codelipenghui @BewareMyPower
BewareMyPower commentedon Sep 12, 2022
@tisonkun Yes. And the Python wheels of new versions (2.10.1+, 2.11.0+) for macOS are still blocked, see #17468
github-actions commentedon Oct 13, 2022
The issue had no activity for 30 days, mark with Stale label.
tisonkun commentedon Nov 10, 2022
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.