Further

Still having path issues, but we’ve chewed through G++ a little.

the command g++ -fPIC -I/path/to/python.3.3/include/python3.3/ LeapPython.cpp /usr/lib/leap/libLeap.so -shared -o LeapPython.so isn’t complete.

First, we need to make that “path/to/python/3.3/include/python3.3” bit actually go to our Python directory. It occurs to me to use $PYTHONPATH, however this is blank.

When re run Python, and print out sys.path, we get our Anaconda directory. So Anaconda hijacks our path variable and takes its place. Not a problem, just an observation.

So now we have the command g++ -fPIC -I~/anaconda3/include/python3.4m/ LeapPython.cpp /usr/lib/leap/libLeap.so -shared -o LeapPython.so

Same error, and we look inside of Leap.i because this is what SWIG uses to generate our LeapPython.cpp file. We see that it also includes “Python.h” and so we append our anaconda directory to it, resulting in ‘#include “~/anaconda3/include/python3.4m/Python.h” and this gets us to Leap.h not found. We find Leap.h in Leap.i and repeat, now with “~/leapmotion-blender-master/pack/Leap.h” and we still get Leap.h not being found.

However, by some strange magick, typing in the full /home/ada/leapmotion-blender-master/pack/Leap.h works! We compile our LeapPython.so successfully!

I notice that we’re using an anaconda environment 3.4 where Blender uses 3.3. We should change that environment to make it work for next time.

This entry was posted in Assignments, DOCUMENTATION and tagged , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.