-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/homebrew/lib/libmsodbcsql.18.dylib' : file not found (0) (SQLDriverConnect)") #1116
Comments
When you say If |
sorry the correct one is: isql -v -k "DRIVER={ODBC Driver 18 for SQL Server};SERVER=xxx;UID=xxx;PWD=xxx" That's my suspecion too. I have installed pyodbc under anaconda, and also using pip install on terminal. I tried installing through brew, but didn't work. How could I solve this issue? Thanks |
also when I run Jupiter notebook through terminal, pyodbc.driver returns null |
It looks like the driver and unixODBC are correct ARM versions, what about python itself? |
Does this support connecting to sql server 2016 perhaps? |
Yes it does |
I have exactly the same problem. Has it been resolved? And why is it closed? |
In the original issue |
Hi, I am running into the same issue, has anyone has solved it? also when I run this one: Thanks |
Use single quotes to escape your connection string. |
Thanks @v-chojas , worked well. -- odbcinst -j show:unixODBC 2.3.11
|
Run |
Thanks @v-chojas , This is the result I have:
Thanks for your help |
Do the same with the |
Thanks @v-chojas , here are my results odbcinst
And isql
|
Hello, I have the same issue. I have been triying to make the conection without sucess. Has anyone been able to establish the connection? |
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/usr/local/lib/libmyodbc8a.so' : file not found (0) (SQLDriverConnect)") |
Check whether pyodbc module is linking to the same unixODBC using |
i am using ubuntu 20.04 os , and isql working with same driver, but pyodbc is unable to connect |
This post helped me for the same issue: |
@silverlightjashmin Were you ever able to resolve this issue? |
@samcofer yes, what i did was uninstall all the driver, restarted the ubuntu server and reinstalled all the driver again. and it worked for me |
I encountered the same error using ubuntu 22.04 . i realised there can be a conflict having both msodbcsql17 and msodbcsql18. so i uninstalled and removed every possible config or driver using following commands and then installed the msodbcsql17 and verified the installation: sudo su
apt-get remove --purge msodbcsql17
apt-get remove --purge msodbcsql18
rm -rf /opt/microsoft/msodbcsql17/
rm -rf /opt/microsoft/msodbcsql18/
--------------
sudo apt-get autoremove
sudo apt-get clean
--------------
sudo apt-get install msodbcsql17 to verify the installation odbcinst -q -d -n "ODBC Driver 17 for SQL Server" hope this help |
Environment
To diagnose, we usually need to know the following, including version numbers. On Windows, be
sure to specify 32-bit Python or 64-bit:
Issue
I have Mac M1, trying to connect to Azure SQL server using pyodbc. my settings works well on my previous windows base laptop, but not here. This is the error I get when trying to connect to sql server using pyodbc
Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/homebrew/lib/libmsodbcsql.18.dylib' : file not found (0) (SQLDriverConnect)")
but file exists.
I checked lipo -info /opt/homebrew/Cellar/msodbcsql18/18.1.1.1/lib/libmsodbcsql.18.dylib
returns:
Non-fat file: /opt/homebrew/Cellar/msodbcsql18/18.1.1.1/lib/libmsodbcsql.18.dylib is architecture: arm64
libmsodbcsql.18.dylib exists in /opt/homebrew/Cellar/msodbcsql18/18.1.1.1/lib/libmsodbcsql.18.dylib, but there is a shortcut in /opt/homebrew/lib/libmsodbcsql.18.dylib. I also changed Driver to the above address, still same result.
This was my process:
I have installed ODBC V18 and brew using Microsoft instruction. when I run this on terminal works fine:
odbcinst -j
unixODBC 2.3.11
DRIVERS............: /opt/homebrew/etc/odbcinst.ini
SYSTEM DATA SOURCES: /opt/homebrew/etc/odbc.ini
FILE DATA SOURCES..: /opt/homebrew/etc/ODBCDataSources
USER DATA SOURCES..: /Users/user_name/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
(base) User_name@TMDLXNPPVJ4J ~ % cat /opt/homebrew/etc/odbcinst.ini
[ODBC Driver 18 for SQL Server]
Description=Microsoft ODBC Driver 18 for SQL Server
Driver=/opt/homebrew/lib/libmsodbcsql.18.dylib
UsageCount=1
pyodbc.drivers() returns [ODBC Driver 18 for SQL Server]
I have also did these:
brew install unixodbc
export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.11/lib"
export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.11/include"
pip install pyodbc
isql -v -k "DRIVER={ODBC Driver 17 for SQL Server};SERVER=xxx;UID=xxx;PWD=xxx"
works by the wayPlease help. thanks
The text was updated successfully, but these errors were encountered: