Yesterday I installed my Raspberry Pi OS Lite (Debian Bullseye) using Raspberry Pi imager on my Mac. Everything in the most straightforward, up-to-date version.
Today I began working with Python. Installed pip using apt-get, then installed bluez for working with Bluetooth in Python. Install seemed OK. But here comes trouble. Any ideas?
pi@pi:~ $ sudo python3 -m pip install pybluez
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pybluez
Downloading https://www.piwheels.org/simple/pybluez/PyBluez-0.23-cp39-cp39-linux_armv7l.whl (128 kB)
|████████████████████████████████| 128 kB 324 kB/s
Installing collected packages: pybluez
Successfully installed pybluez-0.23
pi@pi:~ $ python
Python 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bluetooth
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/dist-packages/bluetooth/__init__.py", line 45, in <module>
from bluetooth.bluez import *
File "/usr/local/lib/python3.9/dist-packages/bluetooth/bluez.py", line 8, in <module>
import bluetooth._bluetooth as _bt
ImportError: libbluetooth.so.3: cannot open shared object file: No such file or directory
>>>
Hardware: Raspberry Pi 3 Model B