hassio-addons / addon-appdaemon

AppDaemon4 - Home Assistant Community Add-ons
https://addons.community
MIT License
150 stars 46 forks source link

installation of pycups fails -> python setup.py bdist_wheel did not run successfully. #271

Closed damyanmp closed 1 year ago

damyanmp commented 1 year ago

Problem/Motivation

Fails to install pycups as a python package. Getting the error: python setup.py bdist_wheel did not run successfully.

Expected behavior

(What you expected to happen)

Actual behavior

Collecting pycups Downloading pycups-2.0.1.tar.gz (62 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.0/63.0 kB 4.2 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Building wheels for collected packages: pycups Building wheel for pycups (setup.py): started Building wheel for pycups (setup.py): finished with status 'error' error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [6 lines of output] In file included from cupsconnection.c:22: cupsconnection.h:25:10: fatal error: Python.h: No such file or directory 25 | #include | ^~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

Steps to reproduce

(How can someone else make/see it happen)

  1. Install AppDaemon add-on

  2. Configure add-on and add the following python packages: cmake, wheel, pycups add the following system packages: cups-dev gcc libcrypto3 libssl3

  3. Tried to force upgrade all packages on run time

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it)

tjorim commented 1 year ago

Looking at the documentation of pycups, you probably also need to add python3-dev to the system packages.

damyanmp commented 1 year ago

It's a bit of a wacamole, I need to find a combination of packages that just works

ERROR: unable to select packages:
  python3-3.10.9-r1:
    breaks: python3-dev-3.10.12-r0[python3=3.10.12-r0]
    satisfies: world[python3=3.10.9-r1]
               glib-dev-2.74.7-r0[python3]
               py3-pip-22.3.1-r1[python3]
               py3-setuptools-65.6.0-r0[python3]
               py3-parsing-3.0.9-r0[python3]
               py3-packaging-21.3-r2[python3]
               py3-wheel-0.38.4-r0[python3]
               py3-retrying-1.3.3-r3[python3]
               py3-six-1.16.0-r3[python3]
tjorim commented 1 year ago

Which version (of the add-on) are you running? Normally it ships with python 3.11.

damyanmp commented 1 year ago

Running 0.11.0, no available updates yet but I see the latest tag is quite a bit ahead

damyanmp commented 1 year ago

used a different repo and downloaded the latest version of the package. resolved the issue