1.将DobotDll/Precompiled/Linux/DobotDll目录下的下面的文件拷贝到DobotDemoForPython目录下
libDobotDll.so.1.0.0,
libQt5Core.so.5.4.0,
libQt5Network.so.5.4.0
ibQt5SerialPort.so.5.4.0
2.DobotDllType.py的load()部分修改:
def load():
if platform.system() == “Windows”:
return CDLL(“DobotDll.dll”, RTLD_GLOBAL)
elif platform.system() == “Darwin”:
return CDLL(“libDobotDll.dylib”, RTLD_GLOBAL)
elif platform.system() == “Linux”:
return CDLL(“libDobotDll.so.1.0.0”, RTLD_GLOBAL)
3.执行时出现下面的错误:
$ python DobotControl.py
Traceback (most recent call last):
api = dType.load()
File “/home/root/workspace_outan/dobotdemo/DobotDemoForPython/DobotDllType.py”, line 430, in load
return CDLL(“libDobotDll.so.1.0.0”, RTLD_GLOBAL)
File “/usr/lib/python2.7/ctypes/init.py”, line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: libDobotDll.so.1.0.0: cannot open shared object file: No such file or directory
有什么解决办法没有?