Error in installing the bluetooth device tracker

Given my earlier post about the recent update breaking the “nmap” device tracker, I have tried the bluetooth tracker and got the below error in the log. Following that, I tried doing it manually (using “pip3”) and got the same error. It appears that there are errors in the code for this module. Any ideas on fixing this?

INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=None, new_state=<state zone.home=zoning; latitude=48.8322, icon=mdi:home, radius=100, longitude=2.3561, friendly_name=Home, hidden=True @ 2016-04-30T14:06:33.292740+02:00>, entity_id=zone.home>
INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=zone>
INFO:homeassistant.loader:Loaded device_tracker.bluetooth_tracker from homeassistant.components.device_tracker.bluetooth_tracker
INFO:homeassistant.util.package:Attempting install of pybluez==0.22
Command "/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/f1/x1cbc0q53sjc8w8sbvyzw4n40000gn/T/pip-build-p5f2np6x/pybluez/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/f1/x1cbc0q53sjc8w8sbvyzw4n40000gn/T/pip-fqesz8r4-record/install-record.txt --single-version-externally-managed --compile --home=/var/folders/f1/x1cbc0q53sjc8w8sbvyzw4n40000gn/T/tmpzg2q0qx6" failed with error code 1 in /private/var/folders/f1/x1cbc0q53sjc8w8sbvyzw4n40000gn/T/pip-build-p5f2np6x/pybluez/
ERROR:homeassistant.bootstrap:Not initializing device_tracker.bluetooth_tracker because could not install dependency pybluez==0.22

I had the same, this is the fix if you are still looking for it:

sudo apt-get update
sudo apt-get install python-pip python-dev ipython

sudo apt-get install bluetooth libbluetooth-dev
sudo pip install pybluez


thanks for this , it helped after that many months :slight_smile:

Thanks! It works!

Thanks! Worked for me too.

Worked for me too.

Thanks fixed for me too

Do you run these within homeassistant container?

I have also tried with Alpine apk command, but some of those packages don’t exist:

apk add python-pip python-dev ipython
apk add bluetooth libbluetooth-dev