我幾乎走遍了整個網絡(打個比方)試圖找到一種方式與藍牙通過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