_ActivateRouter symbol not found loading ClipsPy on arm64 mac

69 Views Asked by At

I want to utilize the CLIPS rules engine within a Python application. However, I am developing on Mac M2, so the popular wrapper clipspy is not available. What's my next best option? Are there any good ways of setting up a separate web server running CLIPS and interface via REST? Should I be writing to a file and using subprocess to call the CLIPS interpreter?

The CLIPS interpreter runs on my Mac M2, but I want a nice way to interface with it from Python.

clipspy docs specifically say it does not work on Mac M architectures. This is the error I get after pip installing and trying to import:

>>> import clips
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/tobrien6/Dev/game/py-server/venv/lib/python3.11/site-packages/clips/__init__.py", line 56, in <module>
    from clips.environment import Environment
  File "/Users/tobrien6/Dev/game/py-server/venv/lib/python3.11/site-packages/clips/environment.py", line 32, in <module>
    from clips.facts import Facts
  File "/Users/tobrien6/Dev/game/py-server/venv/lib/python3.11/site-packages/clips/facts.py", line 47, in <module>
    from clips.modules import Module
  File "/Users/tobrien6/Dev/game/py-server/venv/lib/python3.11/site-packages/clips/modules.py", line 40, in <module>
    from clips.common import CLIPSError
  File "/Users/tobrien6/Dev/game/py-server/venv/lib/python3.11/site-packages/clips/common.py", line 33, in <module>
    from clips._clips import lib, ffi
ImportError: dlopen(/Users/tobrien6/Dev/game/py-server/venv/lib/python3.11/site-packages/clips/_clips.abi3.so, 0x0002): symbol not found in flat namespace '_ActivateRouter'
1

There are 1 best solutions below

0
noxdafox On

As explained in this issue, the MAC M support will be added once GitHub actions will support the architecture for open source projects.

In the meanwhile, you can use the Makefile and open an issue in the project if you encounter problems while compiling.