tox -egenconfig fails in ubuntu 22.04

Bug #2064493 reported by farsheed ahmadian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
masakari
New
Undecided
Unassigned

Bug Description

I installed fresh new openstack in ubuntu 22.04 with zed.
with running tox -egenconfig in masakari main folder i recive this error.
please help me to solve it:

genconfig create: /root/masakari/.tox/genconfig
genconfig installdeps: -chttps://releases.openstack.org/constraints/upper/master, -r/root/masakari/requirements.txt, -r/root/masakari/test-requirements.txt
ERROR: invocation failed (exit code 1), logfile: /root/masakari/.tox/genconfig/log/genconfig-1.log
=================================================================================================== log start ====================================================================================================Collecting alembic>=1.8.0
  Using cached alembic-1.9.4-py3-none-any.whl (210 kB)
Collecting iso8601>=0.1.11
  Using cached iso8601-2.1.0-py3-none-any.whl (7.5 kB)
Collecting jsonschema>=3.2.0
  Using cached jsonschema-4.19.2-py3-none-any.whl (83 kB)
Collecting keystoneauth1>=3.4.0
  Using cached keystoneauth1-5.6.0-py3-none-any.whl (323 kB)
Collecting keystonemiddleware>=4.17.0
  Using cached keystonemiddleware-10.6.0-py3-none-any.whl (150 kB)
Collecting WebOb>=1.7.1
  Using cached WebOb-1.8.7-py2.py3-none-any.whl (114 kB)
Collecting microversion-parse>=0.2.1
  Using cached microversion_parse-1.0.1-py3-none-any.whl (19 kB)
Collecting oslo.config>=5.2.0
  Using cached oslo.config-9.4.0-py3-none-any.whl (128 kB)
Collecting oslo.context>=2.19.2
  Using cached oslo.context-5.5.0-py3-none-any.whl (20 kB)
Collecting oslo.db>=4.44.0
  Using cached oslo.db-15.0.0-py3-none-any.whl (156 kB)
Collecting oslo.messaging>=14.1.0
  Using cached oslo.messaging-14.7.0-py3-none-any.whl (258 kB)
Collecting oslo.i18n>=3.15.3
  Using cached oslo.i18n-6.3.0-py3-none-any.whl (46 kB)
Collecting oslo.log>=3.36.0
  Using cached oslo.log-5.5.1-py3-none-any.whl (76 kB)
Collecting oslo.middleware>=3.31.0
  Using cached oslo.middleware-6.1.0-py3-none-any.whl (62 kB)
Collecting oslo.policy>=3.6.0
  Using cached oslo.policy-4.3.0-py3-none-any.whl (88 kB)
Collecting oslo.service!=1.28.1,>=1.24.0
  Using cached oslo.service-3.4.0-py3-none-any.whl (77 kB)
Collecting oslo.upgradecheck>=1.3.0
  Using cached oslo.upgradecheck-2.3.0-py3-none-any.whl (14 kB)
Collecting oslo.utils>=4.7.0
  Using cached oslo.utils-7.1.0-py3-none-any.whl (101 kB)
Collecting oslo.versionedobjects>=1.31.2
  Using cached oslo.versionedobjects-3.3.0-py3-none-any.whl (86 kB)
Collecting pbr!=2.1.0,>=2.0.0
  Using cached pbr-6.0.0-py2.py3-none-any.whl (107 kB)
Collecting python-novaclient>=9.1.0
  Using cached python_novaclient-18.6.0-py3-none-any.whl (335 kB)
Collecting stevedore>=1.20.0
  Using cached stevedore-5.2.0-py3-none-any.whl (49 kB)
Collecting SQLAlchemy>=1.2.19
  Using cached SQLAlchemy-1.4.51-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)
Collecting SQLAlchemy-Utils>=0.33.10
  Using cached SQLAlchemy_Utils-0.41.2-py3-none-any.whl (93 kB)
Collecting taskflow>=2.16.0
  Using cached taskflow-5.7.0-py3-none-any.whl (494 kB)
Collecting tooz>=2.10.1
  Using cached tooz-6.1.0-py3-none-any.whl (91 kB)
Collecting hacking~=6.0.1
  Using cached hacking-6.0.1-py3-none-any.whl (42 kB)
Collecting coverage!=4.4,>=4.0
  Using cached coverage-7.4.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (233 kB)
Collecting ddt>=1.0.1
  Using cached ddt-1.7.2-py2.py3-none-any.whl (7.1 kB)
Collecting doc8>=0.6.0
  Using cached doc8-1.1.1-py3-none-any.whl (25 kB)
Collecting pep8>=1.5.7
  Using cached pep8-1.7.1-py2.py3-none-any.whl (41 kB)
Collecting psycopg2>=2.8
  Using cached psycopg2-2.9.9.tar.gz (384 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-nd6v3jx1/psycopg2.egg-info
      writing /tmp/pip-pip-egg-info-nd6v3jx1/psycopg2.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-nd6v3jx1/psycopg2.egg-info/dependency_links.txt
      writing top-level names to /tmp/pip-pip-egg-info-nd6v3jx1/psycopg2.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-nd6v3jx1/psycopg2.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.

==================================================================================================== log end =====================================================================================================ERROR: could not install deps [-chttps://releases.openstack.org/constraints/upper/master, -r/root/masakari/requirements.txt, -r/root/masakari/test-requirements.txt]; v = InvocationError('/root/masakari/.tox/genconfig/bin/python -m pip install -chttps://releases.openstack.org/constraints/upper/master -r/root/masakari/requirements.txt -r/root/masakari/test-requirements.txt', 1)
____________________________________________________________________________________________________ summary _____________________________________________________________________________________________________ERROR: genconfig: could not install deps [-chttps://releases.openstack.org/constraints/upper/master, -r/root/masakari/requirements.txt, -r/root/masakari/test-requirements.txt]; v = InvocationError('/root/masakari/.tox/genconfig/bin/python -m pip install -chttps://releases.openstack.org/constraints/upper/master -r/root/masakari/requirements.txt -r/root/masakari/test-requirements.txt', 1)

Revision history for this message
farsheed ahmadian (farshan) wrote (last edit ):

solving problem:
# apt-get install postgresql -y
# pip install psycopg2-binary
# apt-get install libpq-dev -y
# apt-get install mercurial -y
# apt install tox -y

verify hg installation:
# hg --version
# which hg

# find / -name pg_config
outpute: /usr/lib/postgresql/14/bin/pg_config

# export PATH=$PATH:/usr/lib/postgresql/14/bin/pg_config

# cd masakari
# tox -egenconfig

Revision history for this message
farsheed ahmadian (farshan) wrote (last edit ):

README.rst file updated to install masakari and avoid this bug

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.