Устанавливал так:
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
Файл main.py:
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'