我正在尝试安装python蓝牙模块‘lightblue’。我使用macports.When安装了它。我导入了导致一堆错误的模块。
>> 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请帮我安装这个模块,我没有发现很多其他蓝牙编程modules.pybluez没有mac版本
发布于 2013-01-28 02:20:49
This version在Mountain Lion上为我工作得很成功。
发布于 2014-01-26 17:45:40
我不确定这是否直接适用于原始问题,或者不适用于…
执行摘要:使用"sudo“并注意安装程序的错误消息。
我尝试在运行Xcode 5.0.2的Mac上安装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"]},我不得不将LightAquaBlue基础开发工具包的Xcode中的构建设置更改为OSX10.9(它正在寻找10.4u -- "u“= "and up”吗?当我收到Xcode中的错误消息时,我没有使用sudo )
我得到chown权限错误运行安装,直到我使用"sudo python setup.py安装“
最后(叹息),我不得不复制Macintosh HD/Libraries/LightAquaBlue.framework文件夹中的LightAquaBlue别名,并将其粘贴到Macintosh HD/Libraries/LightAquaBlue.framework/Versions/A文件夹中
在所有这些之后我得到了:
**安装成功**
这将在此文件夹中产生一堆对象文件:
lightblue-0.4/src/mac/LightAquaBlue/build/LightAquaBlue.build/Release/LightAquaBlue.build/Objects-normal/x86_64
https://stackoverflow.com/questions/13983125
复制相似问题