1、import bluetooth
报错:no module named bluetooth
原因及解决方法:
You've installed the Python 2 version of the bluez bindings. Either run the script using python2
or install the Python 3 bindings. Since they aren't packaged, you would need to install them using pip:
python3 -m pip install pybluez
2、no module named gattlib
解决方法:
sudo apt-get install libboost-python-dev libboost-thread-dev libbluetooth-dev libglib2.0-dev