fsaris / home-assistant-awox

AwoX mesh light integration for Home Assistant
MIT License
84 stars 23 forks source link

Setup failed for awox after updating to 2021.7. #47

Closed alexvillehart closed 3 years ago

alexvillehart commented 3 years ago

Running hassio core-2021.7.1. in a docker container, after updating to 2021.7. the addon fails to load.

Error generated by setup.py Setup failed for awox: Requirements for awox not found: ['bluepy>=1.3.0'].

And traces back to util/package.py

2021-07-12 19:11:37 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package bluepy>=1.3.0: 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-28u7gqw7/bluepy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-28u7gqw7/bluepy/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-zny6z7w5
       cwd: /tmp/pip-install-28u7gqw7/bluepy/
  Complete output (8 lines):
  /usr/local/lib/python3.9/site-packages/setuptools/dist.py:691: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
    warnings.warn(
  running bdist_wheel
  running build
  running build_py
  Working dir is /tmp/pip-install-28u7gqw7/bluepy
  execute make -C ./bluepy clean
  error: [Errno 2] No such file or directory: 'make'
  ----------------------------------------
  ERROR: Failed building wheel for bluepy
    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-28u7gqw7/bluepy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-28u7gqw7/bluepy/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-1wkbu2tm/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/bluepy
         cwd: /tmp/pip-install-28u7gqw7/bluepy/
    Complete output (8 lines):
    /usr/local/lib/python3.9/site-packages/setuptools/dist.py:691: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
      warnings.warn(
    running install
    running build
    running build_py
    Working dir is /tmp/pip-install-28u7gqw7/bluepy
    execute make -C ./bluepy clean
    error: [Errno 2] No such file or directory: 'make'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-28u7gqw7/bluepy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-28u7gqw7/bluepy/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-1wkbu2tm/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/bluepy Check the logs for full command output.
WARNING: You are using pip version 20.2.4; however, version 21.1.3 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.

Tried downgrading awox to 0.0.4 with no success so I'm guessing it's an issue with the latest version(?). Debug provides no additional log output.

fsaris commented 3 years ago

Looks like you are missing some build tools.

Are you using the official docker image from HA?

Try installing the build tools manually inside the docker container.

apt install make bluetooth libbluetooth

fsaris commented 3 years ago

And maybe you can check if https://www.home-assistant.io/integrations/bluetooth_tracker/ installs. Uses also bluepy

alexvillehart commented 3 years ago

I am using the official image. bluetooth_tracker also fails to install. I guess this is a HA issue instead of a component specific. apt is not installed on the container so I tried apk add make and still no effort.

alexvillehart commented 3 years ago

Performing apk add build-base fixed this issue on my side and allowed me to install bluepy manually, everything is working now.