pyodbc icon indicating copy to clipboard operation
pyodbc copied to clipboard

Azure Automation Python 3.10 ImportError: libodbc.so.2: cannot open shared object file: No such file or directory

Open MSNina123456 opened this issue 8 months ago • 0 comments

pyodbc https://pypi.org/project/pyodbc/5.2.0/ can be imported to Azure automation successfully, but cannot use it in runbook.

Repro runbook script: #!/usr/bin/env python3 import pyodbc

runtime version: Python 3.10

error message: Traceback (most recent call last): File "/usr/src/tmp/e33fbf72-bb07-4539-b139-277bbea3feb4/runbooks/testpy.py", line 3, in import pyodbc ImportError: libodbc.so.2: cannot open shared object file: No such file or directory

it works well with Python 3.8.

It seems an issue with libodbc, but cannot apply the workaround in https://github.com/mkleehammer/pyodbc/issues/1133 because we cannot install anything in automation sandbox.

Need fix it.

MSNina123456 avatar Apr 03 '25 06:04 MSNina123456