我几乎走遍了整个网络(打个比方)试图找到一种方式与蓝牙通过Python在Mac上工作。 PyBluez不兼容,Lightblue没有被维持(无论试过),安装了PyObC框架(包括蓝牙框架),并试图在我的两个2.7.6和3.6.1的环境和MacOS 10.10.5。利用蓝牙在Mac上使用Python
我经常收到类似下面的错误:
Traceback (most recent call last):
File "/Users/***/PycharmProjects/Bluey/main.py", line 1, in <module>
import bluetooth
File "build/bdist.macosx-10.10-intel/egg/bluetooth/__init__.py", line 47, in <module>
File "build/bdist.macosx-10.10-intel/egg/bluetooth/osx.py", line 1, in <module>
File "build/bdist.macosx-10.10-intel/egg/lightblue/__init__.py", line 160, in <module>
File "build/bdist.macosx-10.10-intel/egg/lightblue/_lightblue.py", line 31, in <module>
File "build/bdist.macosx-10.10-intel/egg/lightblue/_macutil.py", line 169, in <module>
objc.BadPrototypeError: Objective-C expects 1 arguments, Python argument has 2 arguments for <unbound selector sleep of BBCocoaSleeper at 0x103cdc030>
Process finished with exit code 1
我也试着重新安装所有这两个环境中上述模块。
我只是希望能够瓦特/带蓝牙的工作Ø改变操作系统的一个项目。我确信我错过了一些东西,因为我怀疑没有人用Python在Mac上编码蓝牙。如果存在固有的兼容性问题,我还有没有发现另一个模块?
有不适合在MacOS BLE任何完整的图书馆。 – tabchas