ion-python
ion-python copied to clipboard
Missing symbol when loading ion: __ion_writer_add_annotation_sid_helper
Using Python 3.9.10 on MacOS (ARM), and wanting to write a client program for QLDB.
-
Installed ion, using pip install, got version 0.10.0
-
Started python and tried importing ion:
import amazon.ion.simpleion as ion Traceback (most recent call last): File "
", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/amazon/ion/simpleion.py", line 38, in import amazon.ion.ionc as ionc ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/amazon/ion/ionc.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '__ion_writer_add_annotation_sid_helper'
- I tried this with version 0.9.3 and got the same error. When I backed up to version 0.8.0, this problem didn't occur and I was able to access QLDB, using Python, from my laptop.
Thanks, Alan
Can you clarify that you are or are not using some form of virtual environment? If you had the commands that you used to install and run that would be helpful as well, including using which
and/or --version
information.
Thanks!!!
Not using a virtual environment, installation was "pip3 install amazon.ion" I'm currently running 0.8.0, as 0.10.0 and 0.9.3 didn't work. Running macOS 13.0 on an M1 Pro laptop (ARM architecture), python 3.9 installed at /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
Running it:
- typed "python3" at the command line, I have version 3.9.10
- typed "import amazon.ion" at the command line, the error messages are in my original post.
We have seen issues with M1 macs and "emulation mode" specifically:
if somehow pip gets run as arm, but python gets run as x86_64, you get module not found.. Beyond that, it's difficult for me to help as I don't have an M1 Mac.
I do think that a more flexible fallback to using the pure python implementation is needed for this case, will get out a PR for that shortly.