I want to create a python api so that i can communicate with my database hosted on sql server. I am trying to create it with help og google cloud platform.But when i am doing it the pyodbc package is not getting installed as it has a sql drive requirement.So how should i install the sql server driver while creating it.
Asked
Active
Viewed 1,002 times
0
-
2Hi, do you have code that you can show? – MForMarlon Jun 18 '19 at 21:40
1 Answers
0
https://colab.research.google.com/drive/1nYIQXfL3lpK34yl-cR1WHwMFkyEBE4qm
You should install ODBC driver for Linux before installing pyodbc as I have exemplified above.
!sudo apt-get install unixodbc-dev
!pip install pyodbc

Sıddık Açıl
- 957
- 8
- 18
-
Then How should i connect it to my sql server? WHat should ne the driver name in it? – akhilesh tawde Jun 21 '19 at 18:49
-
Could you refer to [this](https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-SQL-Server-from-Windows)? – Sıddık Açıl Jun 21 '19 at 20:43