[英]How to install lightblue (bluetooth) module on Snow Leopard?
I'm trying to install the bluetooth module from lightblue . 我正在尝试从lightblue安装蓝牙模块。
My system: Mac OS X Snow Leopard 10.6.8, Python 2.7, gcc 4.2 & 4.0, xcode v.3.2.3 . 我的系统:Mac OS X Snow Leopard 10.6.8,Python 2.7,gcc 4.2和4.0,xcode v.3.2.3。 I checked , i also got python 2.3/2.5/2.6 folders directly under /Library/Python/ in my system (This is different from 2.7 which is located in /Library/Frameworks/Python.framework/Versions/2.7/)
我检查了一下,我在系统中的/ Library / Python /下也直接找到了python 2.3 / 2.5 / 2.6文件夹(这与/Library/Frameworks/Python.framework/Versions/2.7/中的2.7不同)
When I install lightblue with python setup.py install
, I get the following error: 当我使用
python setup.py install
安装lightblue时,出现以下错误:
GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file BBBluetoothOBEXClient.m)
** BUILD FAILED **
So I thought it was about the gcc version. 所以我认为这与gcc版本有关。 So I did: 'export CC=gcc-4.0' or 'export CC=/usr/bin/gcc-4.0' (I got 2 versions of gcc on my Mac; 4.2 and 4.0).
所以我做了:'export CC = gcc-4.0'或'export CC = / usr / bin / gcc-4.0'(我的Mac上有2个版本的gcc; 4.2和4.0)。 Then I checked with
gcc -v
, it's already switched from 4.2 to 4.0. 然后我用
gcc -v
检查,它已经从4.2切换到4.0。 But when I rerun python setup.py install
, it is still showing 4.2: 但是当我重新运行
python setup.py install
,它仍然显示4.2:
GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file BBBluetoothOBEXClient.m)
** BUILD FAILED **
Why is it still showing gcc 4.2? 为什么仍显示gcc 4.2?
Does anyone have any solution? 有人有什么解决方案吗? I tried using pip but got the same result.
我尝试使用pip,但结果相同。
I accidentally found the solution, I grabbed this from : lightblue 我不小心找到了解决方案,我从: lightblue抓起了它
For Mac OS 10.6 users:
对于Mac OS 10.6用户:
Now when running python setup.py install
,I got this : ** BUILD SUCCEEDED **
Using pip will fail, except we alter some of installation source folders as above. 现在,当运行
python setup.py install
,我得到了这个信息: ** BUILD SUCCEEDED **
使用pip将会失败,除非我们如上所述更改一些安装源文件夹。 I got 'build succeeded', but haven't tested the module yet, as I need to finish other installation steps. 我“构建成功”,但是还没有测试模块,因为我需要完成其他安装步骤。 I'm installing nxt-python ( python interface to control/program my lego mindstorm NXT -> nxt-python ).
我正在安装nxt-python(用于控制/编程我的乐高头脑风暴NXT- > nxt-python的python接口 )。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.