Closed dlmgary closed 2 months ago
CC @elgertam @rdheekonda
Hi @dlmgary, using SQL Server requires an ODBC-based driver to connect to SQL Server. The best supported library in Python is PyODBC
, which allows Python to speak to an ODBC implementation. On Windows, ODBC is present out of the box, but on Linux & macOS, the end user must install an ODBC library like unixODBC
(macOS or Linux) or iODBC
(macOS only).
The errors listed indicate that PyODBC
cannot find the shared library needed to initiate the ODBC connection, and thus PyODBC cannot be loaded, causing any references to it to fail.
During development on my Mac, I was able to use PyODBC
with unixODBC
. I did have to configure a couple of the INI
configuration files on my machine to make everything work.
I wrote up a bit of documentation here and you can also check out the unixODBC
docs and the PyODBC
docs.
Let me know if you have any other issues or more specific questions. I can copy-paste some of my configs if you're still struggling to get this to work. Setting up PyODBC
is non-trivial, but once you get it working, it more or less never stops.
CC @romanlutz @rdheekonda
Describe the bug
Tests in
PyRIT/tests/memory/test_azure_sql_memory.py
fail to run in MacOS.Steps/Code to Reproduce
test_azure_sql_memory.py
tests via:pytest tests/memory/test_azure_sql_memory.py
Expected Results
Test passing
Actual Results
Screenshots
Versions
Python dependencies: pyrit: 0.2.2.dev0 Cython: None numpy: 1.26.4 openai: 1.25.1 pip: 24.0 scikit-learn: 1.4.2 scipy: 1.12.0 setuptools: 69.1.1 tensorflow: None torch: 2.1.2 transformers: 4.40.1