Saturday, December 3, 2016

Prototyping with Leap Motion


If you have a Mac and plan on using Python with the Leap, let me save you some trouble and just tell you:
Install Homebrew straight away.
First, some back story. I wanted to start using Python first to prototype with the Leap controller and get a feel for how the frames and gestures are handled. Just setting up the environment turned out to be a headache due to how OS X handles its own Python installation. Several path and dependency problems ensued, but to save you the frustration yourself, install Homebrew if you haven't already and let it manage your packages instead of OS X.
After you have downloaded Homebrew and Python using the simple 'brew' cli commands, you're going to need to use 'install_name_tool' to modify the LeapPython.so library dependency locations. Follow this tutorial.
Once you're finished with those steps, import it into your Python project or Python path and you should be ready to start programming with the Leap Motion!
I spent far too much time trying to get these dependencies resolved on my mac tonight so I didn't get as far as I would have liked with the programming, but I did upload a very simple example that builds on the 'Hello World' tutorial posted by Leap. Will probably get more into it tomorrow when I have a little more time. See you then!

No comments:

Post a Comment