0

我一直在尝试将 vrep 与 python(v 2.7) 一起使用,以完成我正在从事的项目。当我尝试测试它时会发生这种情况:

import vrep
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/vrep.py", line 39, in <module>
    libsimx = CDLL("./remoteApi.dylib")
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(./remoteApi.dylib, 6): image not found

我已经为此苦苦挣扎了一段时间了,我很难过。

4

1 回答 1

2

您必须将 remoteApi.dylib 的路径添加到您的 DYLD_LIBRARY_PATH 环境变量中。

像这样的东西对我有用:

export DYLD_LIBRARY_PATH=~/Downloads/V-REP_PRO_EDU_V3_2_0_rev6_Mac/programming/remoteApiBindings/lib/lib/

否则,可以直接修改vrep.py文件,将这一行libsimx = CDLL("./remoteApi.dylib")的路径改为绝对路径。

于 2015-03-18T09:39:26.817 回答