2012-12-21 38 views
3

我試圖安裝python藍牙模塊'lightblue'.I,它使用macports.In插入它導致了一堆錯誤。python藍牙模塊lightblue在mac osx上無法正常工作10.8

>> import lightblue 
2012-12-21 07:04:13.874 Python[4062:f07] PyObjCPointer created: at 0x7fff788af900 of type {__CFBoolean=} 
2012-12-21 07:04:13.875 Python[4062:f07] PyObjCPointer created: at 0x7fff788af8f0 of type {__CFBoolean=} 
2012-12-21 07:04:13.876 Python[4062:f07] PyObjCPointer created: at 0x7fff788af910 of type {__CFNumber=} 
2012-12-21 07:04:13.876 Python[4062:f07] PyObjCPointer created: at 0x7fff788af928 of type {__CFNumber=} 
2012-12-21 07:04:13.876 Python[4062:f07] PyObjCPointer created: at 0x7fff788af940 of type {__CFNumber=} 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/__init__.py", line 160, in <module> 
    from _lightblue import * 
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/_lightblue.py", line 28, in <module> 
    import _LightAquaBlue 
    File "/opt/local/Library/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/opt/local/Library/Frameworks/LightAquaBlue.framework 

請幫我安裝此module.I沒有找到許多其它藍牙編程modules.pybluez沒有Mac版本

+0

你是如何安裝'lightblue'軟件包的? – inspectorG4dget

+0

這已被問及,並回答 - 請參閱:http://stackoverflow.com/questions/11284694/how-to-install-lightblue-bluetooth-module-on-snow-leopard。 LightBlue於2009年停止使用,並且沒有專門針對Lion或Mountain Lion的更新。 –

+0

@PeterSobot意識到任何其他藍牙模塊? – tez

回答

2

This version成功地爲我工作的山獅。

+0

也許嘗試確定OP的問題以及它與解決方案的關係。 – GraphicsMuncher

+0

我沒有安裝XCode,也不打算安裝它。任何你可以共享構建的LightAquaBlue框架的機會,可以在/ Library/Frameworks/LightAquaBlue.framework找到 – dlamblin

0

我不知道這是否直接適用於原問題或不...

內容提要:用「命令」,並注意安裝程序錯誤消息。

我想在我的Mac上運行的Xcode 5.0.2

安裝lightblue - 0.4從建議,我在不同的地方發現的,我改變了setup.py的這最後一行:

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

我換其他線路在setup.py這些:

packages=["lightblue","LightAquaBlue"], 
package_dir={"lightblue":getpackagedir(), "LightAquaBlue":"%s/LightAquaBlue" % getpackagedir()}, 
package_data={"lightblue":[ ], "LightAquaBlue":["LightAquaBlue.bridgesupport"]}, 

我不得不改變在Xcode生成設置爲LightAquaBlue基地SDK到OS X 10.9(它在找10.4u - 做的「U」 = 「一個nd up「?我沒有使用sudo,當我在Xcode的錯誤消息)

我CHOWN權限錯誤運行安裝,直到我用「sudo的蟒蛇的setup.py安裝」

最後(嘆氣),我不得不復制LightAquaBlue別名在 Macintosh HD /資源庫/ LightAquaBlue.framework文件夾並將其粘貼在 Macintosh HD /資源庫/ LightAquaBlue.framework /版本/ A文件夾

的一切,我弄了:

* *安裝成功**

這將導致這個文件夾在一堆對象文件:

lightblue-0.4/src目錄/ MAC/LightAquaBlue /編譯/ LightAquaBlue.build /發行/ LightAquaBlue.build /目標正常/ x86_64的