While running PyBluez examples, beacon_scan.py beacon.py, at the first time, there is error messages
from gattlib import *ImportError: No module named gattlib
Apparently the module gattlib which is not installed causes this error.
However, as I tried to install gattlib by pip, another error raises
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
So I did 'apt-get install glib-2.0' and the error was removed. But...
In file included from src/gattservices.cpp:12:0:
src/gattlib.h:11:33: fatal error: boost/python/list.hpp: No such file or directory
#include <boost/python/list.hpp>
^
compilation terminated.
Yes, gattlib is still not installed because missing of boost. It's important to know that apt-get cannot find 'boost'. We have to install 'libboost-all-dev' instead.
After those above, 'beacon.py' and 'beacon_scan.py' are ready to go!