bonsai
bonsai copied to clipboard
Error on importing bonsai on Mac M2/arm
Hi, I run in import errors when trying to use bonsai lib on MacBookPro M2 (arm9). Tested with 3.9,3.10 and 3.11 Trackback is pasted below. If I run the same import in Rosetta2 (x86) emulation environment it works perfectly.
Thanks for taking care
python 3.9
$ python
Python 3.9.16 (main, Dec 7 2022, 10:06:04)
[Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bonsai
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/admin/tmp/venv/lib/python3.9/site-packages/bonsai/__init__.py", line 3, in <module>
from .ldapconnection import LDAPConnection
File "/Users/admin/tmp/venv/lib/python3.9/site-packages/bonsai/ldapconnection.py", line 5, in <module>
from bonsai._bonsai import ldapconnection, ldapsearchiter
ImportError: dlopen(/Users/admin/tmp/venv/lib/python3.9/site-packages/bonsai/_bonsai.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_ldap_create_passwordpolicy_control'
$ pip3 freeze | grep bonsai
bonsai==1.5.1
python 3.10
$ python
Python 3.10.10 (main, Feb 16 2023, 02:49:39) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bonsai
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/admin/tmp/venv/lib/python3.10/site-packages/bonsai/__init__.py", line 3, in <module>
from .ldapconnection import LDAPConnection
File "/Users/admin/tmp/venv/lib/python3.10/site-packages/bonsai/ldapconnection.py", line 5, in <module>
from bonsai._bonsai import ldapconnection, ldapsearchiter
ImportError: dlopen(/Users/admin/tmp/venv/lib/python3.10/site-packages/bonsai/_bonsai.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_ldap_create_passwordpolicy_control'
$ pip3 freeze | grep bonsai
bonsai==1.5.1
python 3.11
$ python
Python 3.11.2 (main, Feb 16 2023, 02:55:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bonsai
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/admin/tmp/venv/lib/python3.11/site-packages/bonsai/__init__.py", line 3, in <module>
from .ldapconnection import LDAPConnection
File "/Users/admin/tmp/venv/lib/python3.11/site-packages/bonsai/ldapconnection.py", line 5, in <module>
from bonsai._bonsai import ldapconnection, ldapsearchiter
ImportError: dlopen(/Users/admin/tmp/venv/lib/python3.11/site-packages/bonsai/_bonsai.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_ber_pvt_opt_on'
$ pip3 freeze | grep bonsai
bonsai==1.5.1