python调用电脑蓝牙_用Python在Mac上使用蓝牙
我已經搜索了整個網絡(比喻地說)試圖找到一種在Mac上通過Python使用藍牙的方法。PyBluez不兼容,Lightblue未被維護(無論如何嘗試),安裝了PyObC框架(包括Bluetooth框架),并在帶有MacOS 10.10.5的2.7.6和3.6.1版環境中嘗試。
我經常會出現以下類似的錯誤:Traceback (most recent call last):
File "/Users/***/PycharmProjects/Bluey/main.py", line 1, in
import bluetooth
File "build/bdist.macosx-10.10-intel/egg/bluetooth/__init__.py", line 47, in
File "build/bdist.macosx-10.10-intel/egg/bluetooth/osx.py", line 1, in
File "build/bdist.macosx-10.10-intel/egg/lightblue/__init__.py", line 160, in
File "build/bdist.macosx-10.10-intel/egg/lightblue/_lightblue.py", line 31, in
File "build/bdist.macosx-10.10-intel/egg/lightblue/_macutil.py", line 169, in
objc.BadPrototypeError: Objective-C expects 1 arguments, Python argument has 2 arguments for
Process finished with exit code 1
我還嘗試為這兩個環境重新安裝所有上述模塊。
我只想在一個項目中使用藍牙,不需要改變操作系統。我肯定我錯過了一些東西,因為我懷疑沒有一個代碼的藍牙Mac與Python。如果存在固有的兼容性問題,是否還有其他模塊尚未發現?
總結
以上是生活随笔為你收集整理的python调用电脑蓝牙_用Python在Mac上使用蓝牙的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 音频文件格式怎么转换html,mp3格式
- 下一篇: mac 更换默认蓝牙适配器_如何修复Ma