Hi ,
After use this two to add the path:
% cd DobotDemoForPython
% otool -L libDobotDll.dylib
After that I add the path to the editor and name it as test.py . I try to run test.py on terminal :
test.py
% install_name_tool -change @executable_path/QtSerialPort.framework/Versions/5/QtSerialPort /Users/nghiep/Desktop/Dobot\ Demo\ V2.3-en/demo-magician-mac-os-master/DobotDemoForPython/QtSerialPort.framework/QtSerialPort libDobotDll.dylib
There is no error with change path but the path is not added
This is the error I had when run python3 DobotControl.py :
Traceback (most recent call last):
File "/Users/nghiep/Desktop/Dobot Demo V2.3-en/demo-magician-mac-os-master/DobotDemoForPython/DobotControl.py", line 10, in <module>
api = dType.load()
File "/Users/nghiep/Desktop/Dobot Demo V2.3-en/demo-magician-mac-os-master/DobotDemoForPython/DobotDllType.py", line 460, in load
return CDLL("libDobotDll.dylib", RTLD_GLOBAL)
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(libDobotDll.dylib, 10): Library not loaded: @rpath/QtSerialPort.framework/Versions/5/QtSerialPort
Referenced from: /Users/nghiep/Desktop/Dobot Demo V2.3-en/demo-magician-mac-os-master/DobotDemoForPython/libDobotDll.dylib
Reason: image not found
How could I add new path to my terminal ?