Skip to content

Pack fails to install - cx-Oracle requires Python>=3.5 #9

@namachieli

Description

@namachieli

Looks like the cx-Oracle package was recently updated to require Python 3.5 or higher, so installs of this pack are failing. New version was released June 26

Easy fix for now until ST2 is fully Python 3 is to update requirements.txt and pin cx_Oracle<=7.3.0

I can submit a PR if needed.

  "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    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 --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/local/lib/python2.7/site-packages/python_runner/python_action_wrapper.py\", line 333, in <module>
    obj.run()
  File \"/opt/stackstorm/st2/local/lib/python2.7/site-packages/python_runner/python_action_wrapper.py\", line 192, in run
    output = action.run(**self._parameters)
  File \"/opt/stackstorm/packs/packs/actions/pack_mgmt/setup_virtualenv.py\", line 88, in run
    no_download=no_download)
  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py\", line 122, in setup_pack_virtualenv
    logger=logger)
  File \"/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py\", line 268, in install_requirements
    (requirements_file_path, stdout, stderr))
Exception: Failed to install requirements from \"/opt/stackstorm/packs/sql/requirements.txt\": Collecting sqlalchemy (from -r /opt/stackstorm/packs/sql/requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/5c/af/e6776853e74cb10896adb660c3a4b834c20aac491ebd14424a117ea9eebd/SQLAlchemy-1.3.18-cp27-cp27mu-manylinux2010_x86_64.whl
Collecting psycopg2<=2.7.5 (from -r /opt/stackstorm/packs/sql/requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/7c/e6/d5161798a5e8900f24216cb730f2c2be5e4758a80d35c8588306831c0c99/psycopg2-2.7.5-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pymysql (from -r /opt/stackstorm/packs/sql/requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/ed/39/15045ae46f2a123019aa968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-any.whl
Collecting pymssql (from -r /opt/stackstorm/packs/sql/requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/a6/43/c8430ec972c15999921cbc1bb8396049878695b78c182056bd03240d8c5d/pymssql-2.1.4-cp27-cp27mu-manylinux1_x86_64.whl
Collecting cx_Oracle (from -r /opt/stackstorm/packs/sql/requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/3b/87/8597bdc7fa965c8d984fb9ea7456004eba0131453de335fb65c01f5ce50e/cx_Oracle-8.0.0.tar.gz
 (stderr: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File \"<string>\", line 1, in <module>
      File \"/tmp/pip-install-uuxxv7/cx-Oracle/setup.py\", line 17, in <module>
        raise Exception(\"Python 3.5 or higher is required.\")
    Exception: Python 3.5 or higher is required.
    ----------------------------------------
ERROR: Command \"python setup.py egg_info\" failed with error code 1 in /tmp/pip-install-uuxxv7/cx-Oracle/
WARNING: You are using pip version 19.1.1, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
)
"

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