Open xvolks opened 1 year ago
Seems to work as expected on Linux. Strangely, _olm_error_to_string
is only used internally, so there shouldn't be any linking errors.
Installing using libolm from brew, and older python package works, so there's something strange with the current build process on macOS.
As a temporary workaround @uhoreg told me to install:
brew install libolm
pip3 install python-olm==3.1.3 --global-option="build_ext" --global-option="--include-dirs="`brew --prefix libolm`"/include" --global-option="--library-dirs="`brew --prefix libolm`"/lib"
Remember to remove the version 3.2.15 if necessary.
It worked for me.
I have the same issue on macOS 14 and python3.11 ( i dont have it tested with another python version):
brew install libolm
pip3 install matrix-nio
Traceback (most recent call last):
File "/Users/nitro/Medialyse-Git/JSP Chat/main.py", line 10, in <module>
from nio import AsyncClient, LoginResponse
File "/Users/nitro/Medialyse-Git/JSP Chat/.jspchat_venv/lib/python3.11/site-packages/nio/__init__.py", line 9, in <module>
from .client import *
File "/Users/nitro/Medialyse-Git/JSP Chat/.jspchat_venv/lib/python3.11/site-packages/nio/client/__init__.py", line 3, in <module>
from .base_client import Client, ClientConfig
File "/Users/nitro/Medialyse-Git/JSP Chat/.jspchat_venv/lib/python3.11/site-packages/nio/client/base_client.py", line 36, in <module>
from ..crypto import ENCRYPTION_ENABLED, DeviceStore, OutgoingKeyRequest
File "/Users/nitro/Medialyse-Git/JSP Chat/.jspchat_venv/lib/python3.11/site-packages/nio/crypto/__init__.py", line 25, in <module>
from .sessions import ( # isort:skip
File "/Users/nitro/Medialyse-Git/JSP Chat/.jspchat_venv/lib/python3.11/site-packages/nio/crypto/sessions.py", line 21, in <module>
import olm
File "/Users/nitro/Medialyse-Git/JSP Chat/.jspchat_venv/lib/python3.11/site-packages/olm/__init__.py", line 24, in <module>
from .utility import ed25519_verify, OlmVerifyError, OlmHashError, sha256
File "/Users/nitro/Medialyse-Git/JSP Chat/.jspchat_venv/lib/python3.11/site-packages/olm/utility.py", line 37, in <module>
from _libolm import ffi, lib # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: dlopen(/Users/nitro/Medialyse-Git/JSP Chat/.jspchat_venv/lib/python3.11/site-packages/_libolm.abi3.so, 0x0002): symbol not found in flat namespace '__olm_error_to_string'
The mentioned workaround didnt work for me:
pip3 install python-olm==3.1.3 --global-option="build_ext" --global-option="--include-dirs="`brew --prefix libolm`"/include" --global-option="--library-dirs="`brew --prefix libolm`"/lib"
Update: Same error with python3.8
Hope someone can help, thanks in advanced!
After install in a new venv with
pip install python-olm==3.2.15
I get the message
error symbol not found in flat namespace '__olm_error_to_string'
Tested with python 3.9, 3.10 and 3.11 on macOS 14.