Hello all,
I've been trying to set up the SDK and get Leap working in Python. However, whenever I try to initially import Leap, I get this error:
>>> import Leap
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/mnt/c/Users/kasya_000/Desktop/LeapDeveloperKit_3.2.0+45899_win/LeapDeveloperKit_3.2.0+45899_win/LeapSDK/lib/Leap.py", line 28, in <module>
LeapPython = swig_import_helper()
File "/mnt/c/Users/kasya_000/Desktop/LeapDeveloperKit_3.2.0+45899_win/LeapDeveloperKit_3.2.0+45899_win/LeapSDK/lib/Leap.py", line 20, in swig_import_helper
import LeapPython
ImportError: No module named LeapPython
I'm running the code from the samples directory containing Sample.py, and I use this code to run it:
import os, sys, inspect
src_dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
arch_dir = '../lib/x64' if sys.maxsize > 2**32 else '../lib/x86'
sys.path.insert(0, os.path.abspath(os.path.join(src_dir, arch_dir)))
import Leap
I also add to the path the lib directory itself, since it contains Leap.py but lacks the x86 or x64 libraries. I've tried both Python 3.5 and Python 2.7, but neither works. I get this same issue whether I use v2 or Orion. Can anyone offer any help?