mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.89k stars 562 forks source link

I'm having troubles with Pyodbc on my macbook m1 #1070

Closed SallyCodeP closed 1 year ago

SallyCodeP commented 2 years ago

File "/Users/paulogentil/django-maker/BackendCreator/MapFramework/MapDb.py", line 3, in import pyodbc as dtb ImportError: dlopen(/Users/paulogentil/patovenv/lib/python3.7/site-packages/pyodbc.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/unixodbc/lib/libodbc.2.dylib Referenced from: /Users/paulogentil/patovenv/lib/python3.7/site-packages/pyodbc.cpython-37m-darwin.so Reason: image not found

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= I tried to install unixodbc and configure the odbc.ini file but nothing happens Someone can help me

v-chojas commented 2 years ago

Make sure you are consistently using ARM or x86 binaries throughout. Your Python, pyODBC, unixODBC, and ODBC driver all have to be of the same architecture. Mixing them has been the cause of a few other issues here. https://github.com/mkleehammer/pyodbc/issues?q=M1