8go/matrix-commander

Question: How to install on macos 14.0 +

Closed this issue · 4 comments

Hi i followed the readme to install matrix-commander on a M1+ driven macbook.
I got the following error if i start matrix-commander after installation of all needed:

File "/opt/homebrew/bin/matrix-commander", line 5, in <module>
    from matrix_commander import main
  File "/opt/homebrew/lib/python3.11/site-packages/matrix_commander/__init__.py", line 1, in <module>
    from .matrix_commander import main
  File "/opt/homebrew/lib/python3.11/site-packages/matrix_commander/matrix_commander.py", line 51, in <module>
    from nio import (AsyncClient, AsyncClientConfig, ContentRepositoryConfigError,
  File "/opt/homebrew/lib/python3.11/site-packages/nio/__init__.py", line 9, in <module>
    from .client import *
  File "/opt/homebrew/lib/python3.11/site-packages/nio/client/__init__.py", line 3, in <module>
    from .base_client import Client, ClientConfig
  File "/opt/homebrew/lib/python3.11/site-packages/nio/client/base_client.py", line 35, in <module>
    from ..crypto import ENCRYPTION_ENABLED, DeviceStore, OlmDevice, OutgoingKeyRequest, Sas
  File "/opt/homebrew/lib/python3.11/site-packages/nio/crypto/__init__.py", line 25, in <module>
    from .sessions import (  # isort:skip
  File "/opt/homebrew/lib/python3.11/site-packages/nio/crypto/sessions.py", line 21, in <module>
    import olm
  File "/opt/homebrew/lib/python3.11/site-packages/olm/__init__.py", line 24, in <module>
    from .utility import ed25519_verify, OlmVerifyError, OlmHashError, sha256
  File "/opt/homebrew/lib/python3.11/site-packages/olm/utility.py", line 37, in <module>
    from _libolm import ffi, lib  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: dlopen(/opt/homebrew/lib/python3.11/site-packages/_libolm.abi3.so, 0x0002): symbol not found in flat namespace '__olm_error_to_string'

How i installed ?

  1. brew install libolm dbus libmagic
  2. pip3.11 install --global-option=build_ext --global-option="-I/opt/homebrew/include/" --global-option="-L/opt/homebrew/lib/" matrix-commander

Hope someone can help, thanks in advanced ! :)

8go commented

https://pypi.org/project/matrix-commander/ has 2 bullet points for installation on MacOS.

That page also refers to Issue #79 and Issue #103.

brew uninstall libolm dbus libmagic

Uninstall?

Where is file olm.h located on your hard disk? That gives you a hint which Include directory to use.

Maybe @KizzyCode can help us?

Maybe @johannes87 has some idea?

https://pypi.org/project/matrix-commander/ has 2 bullet points for installation on MacOS.

That page also refers to Issue #79 and Issue #103.

brew uninstall libolm dbus libmagic

Uninstall?

Where is file olm.h located on your hard disk? That gives you a hint which Include directory to use.

Maybe @KizzyCode can help us?

Maybe @johannes87 has some idea?

This was a copy mistake, in fact i run brew install ...
olm.h is located in /opt/homebrew/Cellar/libolm/3.2.15/include/olm/olm.h

found this topic wich had the same problem: matrix-org/olm#85
But the workaround mentioned didnt work.

Sorry, I'm afraid I can't help here 😕 – I don't use matrix commander/libolm on a regular base on macOS anymore and if I need it I just spin up a docker container (which works reasonably well in my usecase)

8go commented

I close this issue as it is old. Please reopen if needed.