ion-python icon indicating copy to clipboard operation
ion-python copied to clipboard

Missing symbol when loading ion: __ion_writer_add_annotation_sid_helper

Open mathstream opened this issue 1 year ago • 3 comments

Using Python 3.9.10 on MacOS (ARM), and wanting to write a client program for QLDB.

  1. Installed ion, using pip install, got version 0.10.0

  2. 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'

  1. 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

mathstream avatar Apr 07 '23 15:04 mathstream

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!!!

rmarrowstone avatar Apr 10 '23 23:04 rmarrowstone

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.

mathstream avatar Apr 11 '23 00:04 mathstream

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.

rmarrowstone avatar May 03 '23 18:05 rmarrowstone