如何在雪豹安装lightblue(蓝牙)模块? [英] How to install lightblue (bluetooth) module on Snow Leopard?

查看:393
本文介绍了如何在雪豹安装lightblue(蓝牙)模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从安装蓝牙模块 lightblue

I'm trying to install the bluetooth module from lightblue.

我的系统:Mac OS X雪豹10.6.8,Python的2.7,GCC 4.2和放大器; 4.0,X code v.3.2.3。
我查了一下,我也得到了直接的Python 2.3 / 2.5 / 2.6文件夹下的/图书馆/ Python的/在我的系统(这是不同于2.7,位于/Library/Frameworks/Python.framework/Versions/2.7/)

My system: 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/)

当我与安装lightblue蟒蛇的setup.py安装,我收到以下错误:

When I install lightblue with python setup.py install, I get the following error:

GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file BBBluetoothOBEXClient.m)
** BUILD FAILED **

所以,我认为这是对的gcc版本。所以,我没有:出口CC = GCC-4.0或出口CC =的/ usr / bin中/ GCC-4.0(我有2个版本的gcc我的Mac上; 4.2和4.0)。然后,我与的gcc -v 检查,它已经从4.2切换到4.0。但是,当我重​​新运行蟒蛇setup.py安装,但仍呈现4.2:

So I thought it was about the gcc version. 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). Then I checked with gcc -v, it's already switched from 4.2 to 4.0. But when I rerun python setup.py install, it is still showing 4.2:

GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file BBBluetoothOBEXClient.m)
** BUILD FAILED **

为什么仍呈现GCC 4.2?

Why is it still showing gcc 4.2?

有没有人有任何解决办法吗?我尝试使用PIP但得到了同样的结果。

Does anyone have any solution? I tried using pip but got the same result.

推荐答案

我无意中找到了解决办法,我抓住这个来自: lightblue

I accidentally found the solution, I grabbed this from : lightblue

对于Mac OS 10.6的用户:


  1. 打开src / MAC / _lightblue.py和变化的签名=V @:@ IB签名=V @:@ IZ(行468)

  2. 下载并解压缩的 LightAquaBlue-python-MacOS10.6.zip ,它包含一个LightAquaBlue目录。这个目录移动到你的Python站点包库,例如/Library/Python/2.6/site-packages

  3. 下载并解压缩的 LightAquaBlue-framework-MacOS10.6.zip ,其中包含了(完全不同的)LightAquaBlue目录。这个目录移动到SRC / MAC,以取代现有的src / MAC / LightAquaBlue目录。这应该可以解决建筑/构建与旧LightAquaBlue X code ++项目存在的问题。

  4. 运行蟒蛇的setup.py安装按正常安装。

  1. Open src/mac/_lightblue.py and change signature="v@:@iB" to signature="v@:@iZ" (line 468)
  2. Download and unzip LightAquaBlue-python-MacOS10.6.zip, which contains a LightAquaBlue directory. Move this directory into your python site-packages library, e.g. /Library/Python/2.6/site-packages
  3. Download and unzip LightAquaBlue-framework-MacOS10.6.zip, which contains a (completely different) LightAquaBlue directory. Move this directory into src/mac to replace the existing src/mac/LightAquaBlue directory. This should fix the architecture/build problems that existed with the old LightAquaBlue xcode project.
  4. Run python setup.py install as per normal to install.

现在,我得到这个: **构建成功**
使用PIP会失败,除非我们改变一些安装源文件夹中如上。
我得到了'构建成功,但还没有测试模块然而,当我需要完成其他的安装步骤。我安装NXT-蟒蛇(Python接口控制/程序我的乐高机器人NXT - >的 NXT-蟒蛇)。

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. 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).

这篇关于如何在雪豹安装lightblue(蓝牙)模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆