home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.59k stars 29.91k forks source link

Platform error device_tracker.bluetooth_tracker - Requirements for bluetooth_tracker not found: ['pybluez==0.22']. #30982

Closed TheQue42 closed 4 years ago

TheQue42 commented 4 years ago

Home Assistant release with the issue:

Home Assistant 0.104.2

Last working Home Assistant release (if known): Home Assistant 0.103.-something

Operating environment (Hass.io/Docker/Windows/etc.):

Docker image: homeassistant/intel-nuc-homeassistant:stable, on opensuse.

Integration:

https://www.home-assistant.io/integrations/bluetooth_tracker/

Description of problem: On start of HA, or when validating konfiguration, HA tries to install the pybluez lib, and fails.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

device_tracker:
  - platform: bluetooth_tracker
    track_new_devices: false
    interval_seconds: 20
    consider_home: 300
    new_device_defaults:
      hide_if_away: false
      track_new_devices: true

Traceback (if applicable):

2020-01-19 20:53:45 INFO (SyncWorker_38) [homeassistant.util.package] Attempting install of pybluez==0.22
2020-01-19 20:53:51 ERROR (SyncWorker_38) [homeassistant.util.package] Unable to install package pybluez==0.22: ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gv5y6mwi/pybluez/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gv5y6mwi/pybluez/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-s9oat92i --python-tag cp37
       cwd: /tmp/pip-install-gv5y6mwi/pybluez/
  Complete output (20 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/bluetooth
  copying bluetooth/ble.py -> build/lib.linux-x86_64-3.7/bluetooth
  copying bluetooth/bluez.py -> build/lib.linux-x86_64-3.7/bluetooth
  copying bluetooth/btcommon.py -> build/lib.linux-x86_64-3.7/bluetooth
  copying bluetooth/msbt.py -> build/lib.linux-x86_64-3.7/bluetooth
  copying bluetooth/osx.py -> build/lib.linux-x86_64-3.7/bluetooth
  copying bluetooth/widcomm.py -> build/lib.linux-x86_64-3.7/bluetooth
  copying bluetooth/__init__.py -> build/lib.linux-x86_64-3.7/bluetooth
  running build_ext
  building 'bluetooth._bluetooth' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/bluez
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I./port3 -I/usr/local/include/python3.7m -c bluez/btmodule.c -o build/temp.linux-x86_64-3.7/bluez/btmodule.o
  unable to execute 'gcc': No such file or directory
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pybluez
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gv5y6mwi/pybluez/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gv5y6mwi/pybluez/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fjtvw2pn/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-gv5y6mwi/pybluez/
    Complete output (20 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/bluetooth
    copying bluetooth/ble.py -> build/lib.linux-x86_64-3.7/bluetooth
    copying bluetooth/bluez.py -> build/lib.linux-x86_64-3.7/bluetooth
    copying bluetooth/btcommon.py -> build/lib.linux-x86_64-3.7/bluetooth
    copying bluetooth/msbt.py -> build/lib.linux-x86_64-3.7/bluetooth
    copying bluetooth/osx.py -> build/lib.linux-x86_64-3.7/bluetooth
    copying bluetooth/widcomm.py -> build/lib.linux-x86_64-3.7/bluetooth
    copying bluetooth/__init__.py -> build/lib.linux-x86_64-3.7/bluetooth
    running build_ext
    building 'bluetooth._bluetooth' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/bluez
    gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I./port3 -I/usr/local/include/python3.7m -c bluez/btmodule.c -o build/temp.linux-x86_64-3.7/bluez/btmodule.o
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gv5y6mwi/pybluez/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gv5y6mwi/pybluez/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fjtvw2pn/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Additional information:

TheQue42 commented 4 years ago

A bit of a python/docker n00b, but shouldnt the install try to use the binary versions from https://wheels.home-assistant.io/alpine-3.10/amd64/ ?

It might be obvious, but at least I seem to be able to solve the issue temporarily, by downloading the PyBluez-0.22-cp37-none-any.whl from the wheels above, and then manually pip-installing.

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

LordNex commented 10 months ago

I just added mine and I'm still getting this. Seems rather old. Hasn't this been fixed?

LordNex commented 10 months ago

A bit of a python/docker n00b, but shouldnt the install try to use the binary versions from https://wheels.home-assistant.io/alpine-3.10/amd64/ ?

It might be obvious, but at least I seem to be able to solve the issue temporarily, by downloading the PyBluez-0.22-cp37-none-any.whl from the wheels above, and then manually pip-installing.

Could you explain how you're doing this please. I'm having the same issue running a script

image