gpt4 book ai didi

Python 不导入 Leap Motion 库

转载 作者:行者123 更新时间:2023-12-03 18:28:02 26 4
gpt4 key购买 nike

我正在尝试在 python 中运行 Leap Motion 的基础知识。

import os, sys, inspect, thread, time

代码可以在这里看到..
http://pastie.org/10883595

我收到一个错误....
Traceback (most recent call last):
File "Sample.py", line 6, in <module>
import Leap
ImportError: No module named Leap

文件/usr/bin/Playground_Data/Plugins/x86_64/libLeap.so 存在,

我可以将/usr/bin 添加到 PYTHONPATH 但它仍然找不到它。

我正在使用 ubuntu 16.04。

有什么想法可以让我找到图书馆吗?

凯文

最佳答案

我有同样的问题,但在 Windows 中。

更改 Sample.py,将路径添加到 Leap.py 和 LeapPython.pyd 并且它起作用了。

import sys
sys.path.insert(0, "../lib")
sys.path.insert(1, "../lib/x86")

关于Python 不导入 Leap Motion 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37914792/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com