2

I am using an anaconda's python 2.7 distribution as my default python distribution. I receive a Fatal Python error: PyThreadState_Get: no current thread This error seems to be a result of a python distribution conflict; I am using anconda's python distribution but Leap motion's sdk anticipates the default mac distribution.

I followed Leap motion's sdk instructions on changing the default python distribution as follows,

install_name_tool -change /Library/Frameworks/Python.framework/Versions/2.7/Python //anaconda/bin/python LeapPython.so

But now I receive the following error, which I have not been able to make much of,

Traceback (most recent call last): File "Sample.py", line 9, in <module> import Leap, sys, thread, time File "/Users/jkarimi91/Documents/Projects/hackingedu/LeapDeveloperKit_2.3.1+31549_mac/LeapSDK/lib/Leap.py", line 28, in <module> LeapPython = swig_import_helper() File "/Users/jkarimi91/Documents/Projects/hackingedu/LeapDeveloperKit_2.3.1+31549_mac/LeapSDK/lib/Leap.py", line 24, in swig_import_helper _mod = imp.load_module('LeapPython', fp, pathname, description) ImportError: dlopen(/Users/jkarimi91/Documents/Projects/hackingedu/LeapDeveloperKit_2.3.1+31549_mac/LeapSDK/lib/LeapPython.so, 2): Library not loaded: //anaconda/bin/python Referenced from: /Users/jkarimi91/Documents/Projects/hackingedu/LeapDeveloperKit_2.3.1+31549_mac/LeapSDK/lib/LeapPython.so Reason: no suitable image found. Did find: //anaconda/bin/python: can't map unslidable segment __TEXT to 0x100000000 with size 0x1000

jkarimi
  • 1,247
  • 2
  • 15
  • 27

1 Answers1

0

I think the problem is that you are trying to load the Python executable, not the shared library. Since Anaconda doesn't seem to give you a framework, try replacing /anaconda/bin/python in your command with /anaconda/pkgs/python-2.7.10.0 or if that doesn't work, specify the full path to the Python dylib /anaconda/pkgs/python-2.7.10.0/lib/libpython2.7.dylib.

Charles Ward
  • 1,388
  • 1
  • 8
  • 13