Windows7-64bit + Python2.7.15-64bit + Pybluez
安装pybluez时会报错,处理方法~
1.安装VCForPython27.msi,这是为了提供visual c++ 9.0运行环境
2.C:\Program Files (x86)\Microsoft SDKs\Windows\ 目录中 V7.0A 改为 V6.0A
重新pip2 install pybluez,很快就完成环境安装
A Python Bluetooth library for the Windows and GNU/Linux operating systems. Mac OSX and Linux Python are supported by LightBlue, a number of cell phones running the Symbian OS are supported under Python. The following examples use the PyBluez bluetooth library.
翻译成中文意思大概就是:Linux和Windows系统都能使用这个python蓝牙库,其中Mac和Linux还可以支持LightBlue这个库,部分塞班(Symbian)系统也支持蓝牙库pybluez
from bluetooth import * print "performing inquiry..." nearby_devices = discover_devices(lookup_names = True) print "found %d devices" % len(nearby_devices) for name, addr in nearby_devices: print " %s - %s" % (addr, name)
原文:https://www.cnblogs.com/YangARTuan/p/10713086.html