Ishik, Remy, Xuemin
First, we got the gcc build script command to work by copying the Leap.h header file into the working directory for the package. With that fixed, we were able to import the package into the python console in Blender, but upon checking the imported contents of the package with print(dir(<package_name>)), we only had generic methods shown.
To check for the error, we tried to import the Leap.py module into python directly in the terminal, and encountered an error wherein python’s import function was unable to access/open the libLeap.so source code that the SWIG-generated Leap.py wraps around. We fixed this by copying this file (libLeap.so) into python’s /lib directory, where it contains its standard libraries, which allowed python to succesfully import Leap(.py), thus allowing us to successfully import the Leap module into Blender’s python console.
Our next challenge will surround the fact that Blender naturally checks the system /lib directory for any required python libraries (such as our libLeap.so), which requires admin access to add/remove files from. There is a directly equivalent /lib directory in anaconda’s python directory into which we can copy libLeap.so without admin access, so given that we want the install process to be as user-friendly as possible, we need to figure out how to have Blender look in the anaconda /lib directory when trying to import our Leap module.
See you next week for more “Adventures in BlendConda!”