1

Im trying to use the lightblue module for python, i installed it without problem, but when i try to import it, it gives me the error "ImportError: No module named Foundation" used inside lightblue. I've searched for that module (Foundation) but i haven't got a good answer on where to get it.

Any advice?

PS: Sorry for my bad english

Ghost
  • 1,426
  • 5
  • 19
  • 38
  • This question has been answered here: (http://stackoverflow.com/questions/1614648/importerror-no-module-named-foundation). Good luck! – Walton Aug 04 '13 at 13:13

1 Answers1

0

export PYTHONPATH="/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/"

if it ask for the Foundation module.also check that your bluetooth is on and that you have replaced the last line (number 66) in setup.py like this:

os.system("xcodebuild install -arch 'x86_64' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")

and last but not least check in _initblue.py (inside lightblue-0.4-master/src/mac) line 468 > replace with this one 'signature="v@:@iZ"' (double check it on goog)

you then run: 'sudo python setup.py install'

I have tried all these in 10.9 after many fails, but it then imported the module and found the bluetooth around me.good luck

Gakis41
  • 1,831
  • 2
  • 11
  • 13