Traceback (most recent call last):
File "/Users/celtte/miniconda3/envs/my_env/lib/python3.9/site-packages/pyswip/__init__.py", line 29, in <module>
from pyswip.prolog import Prolog
File "/Users/celtte/miniconda3/envs/my_env/lib/python3.9/site-packages/pyswip/prolog.py", line 28, in <module>
from pyswip.core import *
File "/Users/celtte/miniconda3/envs/my_env/lib/python3.9/site-packages/pyswip/core.py", line 572, in <module>
_lib = CDLL(_path, mode=RTLD_GLOBAL)
File "/Users/celtte/miniconda3/envs/my_env/lib/python3.9/ctypes/__init__.py", line 382, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/homebrew/Cellar/swi-prolog/8.4.1/libexec/lib/swipl/lib/arm64-darwin/libswipl.dylib, 10): no suitable image found. Did find:
/opt/homebrew/Cellar/swi-prolog/8.4.1/libexec/lib/swipl/lib/arm64-darwin/libswipl.dylib: mach-o, but wrong architecture
/opt/homebrew/Cellar/swi-prolog/8.4.1/libexec/lib/swipl/lib/arm64-darwin/libswipl.8.4.1.dylib: mach-o, but wrong architecture
I am using a Apple M1 chip which may cause the incompatibility. I have tried following advice from https://github.com/explosion/spaCy/discussions/9561 but this has not solved the issue. I am using Python 3.9.7 with 64 bit architecture and SWI-Prolog version 8.4.1. I have tried resolving the incompatibility by trying different Python versions from https://www.python.org/downloads/macos/ or installing it with brew but no luck. Would you please have any suggestion for which python / swi-prolog to use?
I thank you in advance for any advice you may have!
Céline