I am trying to connect to my SQL server on google colab by using pyodbc. However, it tells me that I cannot find the driver.
Code to install packages (I replaced IP, por
I had the same problem, but finally figured out that installing the ODBC package direct from microsoft could solve it. Run the following code as a single batch in colab.
%%sh
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get -q -y install msodbcsql17
Thanks both of you, this worked for me:
%%sh
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get -q -y install msodbcsql17
!sudo apt-get install unixodbc-dev
!pip install pyodbc
!pip install chart_studio
import pyodbc