我尝试使用 PyBluez 在树莓派上运行低功耗蓝牙示例。
所有示例都需要 gattlib 模块。我收到错误
from gattlib import *
ImportError: No module named gattlib
Run Code Online (Sandbox Code Playgroud)
我尝试安装它:
pip3 install gattlib
Run Code Online (Sandbox Code Playgroud)
但这行不通?我无法安装 gattlib?
编辑:这是安装 gattlib 时的输出:
pi@raspberrypi:~ $ pip3 install gattlib
Collecting gattlib
Using cached https://files.pythonhosted.org/packages/be/2f/5b1aecec551b42b59d8b399ad444b5672972efb590ca83d784dbe616a3e1/gattlib-0.20150805.tar.gz
Complete output from command python setup.py egg_info:
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
Traceback (most recent call last):
File "<string>", line 1, in <module>
File …Run Code Online (Sandbox Code Playgroud)