Skip to content

Install causes error with intersystems-irispython connection #31

@gabriel-ing

Description

@gabriel-ing

Installing sqlalchemy-iris after intersystems-irispython breaks the iris module from intersystems-irispython. After installation, iris.connect no longer exists.

>>> import iris
>>> iris.connect("localhost", 1972, "USER", "SuperUser", "SYS")
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    iris.connect("localhost", 1972, "USER", "SuperUser", "SYS")
    ^^^^^^^^^^^^
AttributeError: module 'iris' has no attribute 'connect'

Steps to reproduce

Install SDK and sqlalchemy-iris in a clean environment:

# create clean environment 
python -m venv test
# activate environment
.\test\Scripts\activate

pip install intersystems-irispython
pip install sqlalchemy-iris

Try to connect with iris in python

import iris
iris.connect("localhost", 1972, "USER", "SuperUser", "SYS")

Error:

Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    iris.connect("localhost", 1972, "USER", "SuperUser", "SYS")
    ^^^^^^^^^^^^
AttributeError: module 'iris' has no attribute 'connect'

Workaround

Forcing a re-install of intersystems-irispython after installing sqlalchemy-iris fixes the problem:

pip install --force-reinstall intersystems-irispython

Versions

Python 3.13.9
pip 25.2
intersystems-irispython-5.3.1 (although I've had the same issue with previous versions)
sqlalchemy_iris-0.18.1
Windows

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