Answer the question
In order to leave comments, you need to log in
Why is pyodbc not working?
Installed like this:
638 sudo apt-get install unixodbc unixodbc-dev freetds-dev tdsodbc python-dev
639 zsudo easy_install pyodbc
640 sudo easy_install pyodbc
...
649 sudo apt-get install python-pip
650 sudo apt-get install unixodbc-dev
651 pip install pyodbc
import pyodbc
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=127.0.0.1;DATABASE=Voropaev;UID=SA;PWD=.gbnth143')
cursor = cnxn.cursor()
python ./main.py
Traceback (most recent call last):
File "./main.py", line 2, in <module>
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=127.0.0.1;DATABASE=Voropaev;UID=SA;PWD=.gbnth143')
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found (0) (SQLDriverConnect)")
python3 ./main.py
Traceback (most recent call last):
File "./main.py", line 1, in <module>
import pyodbc
ImportError: No module named 'pyodbc'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question