Skip to content

Pack install fails on Stackstorm 3.8 #26

@bertyah

Description

@bertyah

Pack install fails

Stackstorm version 3.8
Python version 3.8.10

{
  "stdout": "",
  "stderr": "st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Setting up virtualenv for pack \"sql\" (/opt/stackstorm/packs/sql)
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Removing virtualenv in \"/opt/stackstorm/virtualenvs/sql\"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Virtualenv successfully removed.
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Creating virtualenv for pack \"sql\" in \"/opt/stackstorm/virtualenvs/sql\"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Creating virtualenv in \"/opt/stackstorm/virtualenvs/sql\" using Python binary \"/opt/stackstorm/st2/bin/python\"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Running command \"/opt/stackstorm/st2/bin/virtualenv -p /opt/stackstorm/st2/bin/python --always-copy --verbose --no-download /opt/stackstorm/virtualenvs/sql\" to create virtualenv.
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Installing base requirements
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Installing requirement six>=1.9.0,<2.0 with command /opt/stackstorm/virtualenvs/sql/bin/pip install six>=1.9.0,<2.0.
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Installing pack specific requirements from \"/opt/stackstorm/packs/sql/requirements.txt\"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Installing requirements from file /opt/stackstorm/packs/sql/requirements.txt with command /opt/stackstorm/virtualenvs/sql/bin/pip install -U -r /opt/stackstorm/packs/sql/requirements.txt.
Traceback (most recent call last):
  File \"/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py\", line 395, in <module>
    obj.run()
  File \"/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py\", line 214, in run
    output = action.run(**self._parameters)
  File \"/opt/stackstorm/packs/packs/actions/pack_mgmt/setup_virtualenv.py\", line 93, in run
    setup_pack_virtualenv(
  File \"/opt/stackstorm/st2/lib/python3.8/site-packages/st2common/util/virtualenvs.py\", line 133, in setup_pack_virtualenv
    install_requirements(
  File \"/opt/stackstorm/st2/lib/python3.8/site-packages/st2common/util/virtualenvs.py\", line 301, in install_requirements
    raise Exception(
Exception: Failed to install requirements from \"/opt/stackstorm/packs/sql/requirements.txt\": Collecting cx_Oracle<=7.3.0
  Downloading cx_Oracle-7.3.0-cp38-cp38-manylinux1_x86_64.whl (759 kB)
Collecting psycopg2<=2.8
  Downloading psycopg2-2.8.tar.gz (367 kB)
 (stderr:     ERROR: Command errored out with exit status 1:
     command: /opt/stackstorm/virtualenvs/sql/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-install-4h25zxhl/psycopg2_622ced5c17ef4a83848937460fe16724/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-install-4h25zxhl/psycopg2_622ced5c17ef4a83848937460fe16724/setup.py'\"'\"';f=getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__);code=f.read().replace('\"'\"'\
\
'\"'\"', '\"'\"'\
'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ax_uihf9
         cwd: /tmp/pip-install-4h25zxhl/psycopg2_622ced5c17ef4a83848937460fe16724/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-ax_uihf9/psycopg2.egg-info
    writing /tmp/pip-pip-egg-info-ax_uihf9/psycopg2.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-ax_uihf9/psycopg2.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-ax_uihf9/psycopg2.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-ax_uihf9/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
    <http://initd.org/psycopg/docs/install.html>).
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.3.3; however, version 23.1.2 is available.
You should consider upgrading via the '/opt/stackstorm/virtualenvs/sql/bin/python -m pip install --upgrade pip' command.
)
",
  "exit_code": 1,
  "result": "None"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions