Title
e

ekeras

12/22/2022, 12:34 PM
Hi! I am trying to connect to MSSQL database using pyodbc, so I need to install pyodbc on orchest in Environment Setup. In order to have pyodbc, I also need to install unixodbc-dev and that's fine, I've installed it successfully. However, when I try to connect to database using FreeTDS, I get this error:
[unixODBC][Driver Manager]Can't open lib 'FreeTDS' : file not found (0) (SQLDriverConnect)")
How would I solve it on my local machine? I'd configure /etc/odbcinst.ini in such a way:
echo "[FreeTDS]\n\
Description = FreeTDS unixODBC Driver\n\
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so\n\
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so" | sudo tee -a /etc/odbcinst.ini
I tried the same on Orchest, but that doesn't fix the issue, because driver is not necessarily in the same location. In order to locate the needed location, I'd like to navigate through directories and see if it even exists. One way to do that on Orchest is to do
ls
commands to find if file is existent while Setting up and environment. But as you can understand that's very inconvenient. My question: is there any other way how I could get to look into files? Or even better maybe you know a solution to FreeTDS issue?
y

Yannick

12/22/2022, 12:59 PM
is there any other way how I could get to look into files?
There is! If you open a terminal in JupyterLab, then it will actually run inside one of your environments. Thus allowing you to interactively interact with your files (do note that changes are not persisted and the actual set-up needs to be in the Environment's setup script).
Or even better maybe you know a solution to FreeTDS issue?
That would indeed be even better, but sadly I do not. Would have to look deeper into it.
Hope that answers your question! :)
e

ekeras

12/22/2022, 1:13 PM
Thanks!
👍 1