【问题标题】:Python and vrep Remoteapi issuePython 和 vrep Remoteapi 问题
【发布时间】:2015-03-10 16:40:46
【问题描述】:

我一直在尝试将 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

我已经为此苦恼了一段时间了,我被难住了。

【问题讨论】:

    标签: python python-2.7 dylib remoteapi


    【解决方案1】:

    您必须将 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")这一行的路径改为绝对路径。

    【讨论】:

    • 对于更新版本export DYLD_LIBRARY_PATH=~/Downloads/V-REP_PRO_EDU_V3_5_0_Mac/programming/remoteApiBindings/lib/lib/Mac/ 为我工作。 (注意末尾多出的Mac/
    猜你喜欢
    • 1970-01-01
    • 2013-02-26
    • 1970-01-01
    • 2020-09-06
    • 2018-01-10
    • 2017-04-20
    • 1970-01-01
    • 1970-01-01
    • 2022-11-24
    相关资源
    最近更新 更多