Come posso installare una libreria bluetooth funzionante per Python?

4

Devo accedere al Bluetooth da Python. Ho provato a installare lightblue tramite easy_install. Si installa correttamente, ma quando provo a importarlo fallisce.

User@Mac:codes$ python
Python 2.7.5 (default, Sep 24 2013, 20:58:05)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lightblue
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/__init__.py", line 160, in <module>
from _lightblue import *
File    "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/_lightblue.py", line 23, in <module>
import Foundation
ImportError: No module named Foundation

Ciò significa che il modulo chiamato "Foundation" non esiste o Python non riesce a trovarlo. Ho continuato la mia ricerca e ho trovato questo . Ho seguito le istruzioni:

User@Mac:codes$ export PYTHONPATH="/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/"

E riprovato:

Python 2.7.5 (default, Sep 24 2013, 20:58:05)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> import lightblue

E ottenuto questo:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File     "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/__init__.py", line 160, in <module>
from _lightblue import *
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/_lightblue.py", line 28, in <module>
import _LightAquaBlue
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/_LightAquaBlue.py", line 32, in <module>
_FRAMEWORK_PATH)
ImportError: Cannot load LightAquaBlue framework, not found at/Library/Frameworks/LightAquaBlue.framework

E ho provato a installare python dal link . Cosa posso fare più?

    
posta Hannes Karppila 30.03.2014 - 10:05
fonte

0 risposte

Leggi altre domande sui tag