I have an Mac with M1 processor and use Python 3.9 for ARM. I imported labjack and can run labjack.ljm but when I try to call labjack.lim.openS() get the AttributeError:
'NoneType' object has no attribute 'LJM_OpenS'
So I tried to run ctypes.CDLL('/usr/local/lib/libLabJackM.dylib') and got the following error:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/usr/local/lib/libLabJackM.dylib, 6): no suitable image found. Did find:
/usr/local/lib/libLabJackM.dylib: mach-o, but wrong architecture
/usr/local/lib/libLabJackM.dylib: stat() failed with errno=316
I suppose this has something to do with the M1 processor. However with the Kipling I can connect the T7 without any problems.
Please advise. Any suggestions how to solve this problem would be greatly appreciated.
We do not currently have LJM binary built for M1 Macs, but we do have someone looking into making an M1 compatible build. We will try to keep you updated on M1 support. Sorry for any inconvenience.
Another user said they were able to load the library by using Rosetta to emulate an x86 Python process and using our x86 binary, but they had some issues with stream mode acquisition under this setup.