Git Product home page Git Product logo

Comments (8)

freol35241 avatar freol35241 commented on September 26, 2024

Hi, thanks for reporting, however I cant seem to reproduce this. Can you give some more details about your setup?

from ltss.

SergioRius avatar SergioRius commented on September 26, 2024

Hi, thanks for reporting, however I cant seem to reproduce this. Can you give some more details about your setup?

Of course. My setup is a Core install running on a Debian LXC container.
You can find the orchestration script here: https://github.com/tteck/Proxmox/blob/main/install/homeassistant-core-install.sh

But the fact is that I completely removes the requirement from the manifest and it's working. I was only telling you in case it was a left-over.

from ltss.

freol35241 avatar freol35241 commented on September 26, 2024

Thanks for reporting back.

Well, sqlalchemy on its own does not know how to connect to a postgres instance without a separate package which can be anyone of the ones as specified here.

And it looks like you already install psycopg2-binary which would explain why it works without psycopg2 in the manifest file. Not sure if it is possible to install both psycopg2-binary and psycopg2 in the same environment?

from ltss.

freol35241 avatar freol35241 commented on September 26, 2024

This issue may also have been made redundant with the merge of #42 ?

from ltss.

SergioRius avatar SergioRius commented on September 26, 2024

This issue may also have been made redundant with the merge of #42 ?

Looks good to me.

from ltss.

wizmo2 avatar wizmo2 commented on September 26, 2024

Recommend reopening this in case others are experiencing the same issues. PSYCOPG potentially has a fix in place (psycopg/psycopg2@c96f991) but not released yet (?). In the meantime, as per @SergioRius, I edited the manifest.json to use pyscopg2 (removed '-binary') and it runs fine. 🥇

I'm running on a 32bit RPI3 with

Home Assistant 2023.6.3
Supervisor 2023.06.4
Operating System 8.2 / 9.5/ 10.3
Frontend 20230608.0 - latest

And had this in the logs

2023-07-03 13:19:36.423 ERROR (SyncWorker_9) [homeassistant.util.package] Unable to install package psycopg2-binary>=2.8,<3.0: error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      /usr/local/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      running egg_info
      creating /tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info
      writing /tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info/dependency_links.txt
      writing top-level names to /tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info/SOURCES.txt'
      
      Error: pg_config executable not found.
      
      pg_config is required to build psycopg2 from source.  Please add the directory
      containing pg_config to the $PATH or specify the full executable path with the
      option:
      
          python setup.py build_ext --pg-config /path/to/pg_config build ...
      
      or with the pg_config option in 'setup.cfg'.
      
      If you prefer to avoid building psycopg2 from source, please install the PyPI
      'psycopg2-binary' package instead.
      
      For further information please check the 'doc/src/install.rst' file (also at
      <https://www.psycopg.org/docs/install.html>).
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
2023-07-03 13:19:36.429 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration ltss: Requirements for ltss not found: ['psycopg2-binary>=2.8,<3.0'].

from ltss.

freol35241 avatar freol35241 commented on September 26, 2024

Recommend reopening this in case others are experiencing the same issues. PSYCOPG potentially has a fix in place (psycopg/psycopg2@c96f991) but not released yet (?). In the meantime, as per @SergioRius, I edited the manifest.json to use pyscopg2 (removed '-binary') and it runs fine. 🥇

I'm running on a 32bit RPI3 with

Home Assistant 2023.6.3
Supervisor 2023.06.4
Operating System 8.2 / 9.5/ 10.3
Frontend 20230608.0 - latest

And had this in the logs

2023-07-03 13:19:36.423 ERROR (SyncWorker_9) [homeassistant.util.package] Unable to install package psycopg2-binary>=2.8,<3.0: error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      /usr/local/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      running egg_info
      creating /tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info
      writing /tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info/dependency_links.txt
      writing top-level names to /tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-vx4_dr1h/psycopg2_binary.egg-info/SOURCES.txt'
      
      Error: pg_config executable not found.
      
      pg_config is required to build psycopg2 from source.  Please add the directory
      containing pg_config to the $PATH or specify the full executable path with the
      option:
      
          python setup.py build_ext --pg-config /path/to/pg_config build ...
      
      or with the pg_config option in 'setup.cfg'.
      
      If you prefer to avoid building psycopg2 from source, please install the PyPI
      'psycopg2-binary' package instead.
      
      For further information please check the 'doc/src/install.rst' file (also at
      <https://www.psycopg.org/docs/install.html>).
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
2023-07-03 13:19:36.429 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration ltss: Requirements for ltss not found: ['psycopg2-binary>=2.8,<3.0'].

I have to say I am slightly confused here...

You get this error while trying to install psycopg2-binary? But the error message contains text suggesting that in order to avoid building psycopg2 from source, you should use psycopg2-binary? This suggests that there is no pre-built wheel-file available for your environment (rpi, python3.11) which also seems to be the case (https://www.piwheels.org/project/psycopg2-binary/).

On the other hand, I assume you are running home assistant OS which I assumed made sure all necessary wheels are available for the supported platform, but my knowledge here is a bit rusty...

from ltss.

wizmo2 avatar wizmo2 commented on September 26, 2024

Me too! (on confused and rusty). I assume its a Python 11 'thing'. There seems to be a lot of them! As you say the binary is not available, and the PR to fix the build issue has not been released. My guess is that the HA team manually built the docker image from the psycopg2 current branch. I'm not setup to debug on the RPi, and since this all goes away when the adapter gets a new release....

from ltss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.