Any Solution to SQLDriverConnect Error in Django Occurred Below using pyodbc
My comment to the question apparently solved the problem:

Python 3.5.2 and unixODBC 2.3.1 sounds like Ubuntu 16.04. Some packages in the Ubuntu repositories can be very old, e.g., unixODBC 2.3.1 is almost 7 years old now. Since it is unixODBC that is crashing (in SQLDriverConnectW) you might want to try upgrading it to the latest version (currently 2.3.7).
I am using "django-pyodbc-azure" 3rd party library for making connection and django1.11 and python version 3.5.2

*** Error in `/home/ubuntu/GET-Services_mssql/env_mssql/bin/python': double free or corruption (!prev): 0x00007f7f08078a90 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f7f2a7a17e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f7f2a7aa37a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f7f2a7ae53c]
/usr/lib/x86_64-linux-gnu/libodbc.so.2(SQLDriverConnectW+0x9a0)[0x7f7f24055100]
/home/ubuntu/GET-Services_mssql/env_mssql/lib/python3.5/site-packages/pyodbc.cpython-35m-x86_64-linux-gnu.so(_Z14Connection_NewP7_objectbblbS0_R6Object+0x2c3)[0x7f7f242a52a3]
/home/ubuntu/GET-Services_mssql/env_mssql/lib/python3.5/site-packages/pyodbc.cpython-35m-x86_64-linux-gnu.so(+0x111de)[0x7f7f242a21de]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyCFunction_Call+0x77)[0x4e9ba7]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x59f5)[0x53c6d5]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x540199]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x50b2)[0x53bd92]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5434af]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyCFunction_Call+0x4f)[0x4e9b7f]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x614)[0x5372f4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebd23]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4fb9ce]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_CallFunctionObjArgs+0x128)[0x5c1988]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x20bc)[0x538d9c]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebd98]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_CallFunctionObjArgs+0x128)[0x5c1988]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(_PyObject_GenericGetAttrWithDict+0x1bd)[0x593b9d]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x44d)[0x53712d]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x540199]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x50b2)[0x53bd92]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x540199]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x50b2)[0x53bd92]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ed3f5]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5b7994]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5b7fbc]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x57f03c]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4ec6)[0x53bba6]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4b04)[0x53b7e4]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebd23]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4fb9ce]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x584716]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5761aa]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x54320c]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x4ce6)[0x53b9c6]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebe37]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x252b)[0x53920b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x5406df]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x54f0)[0x53c1d0]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebe37]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyObject_Call+0x47)[0x5c1797]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalFrameEx+0x252b)[0x53920b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python(PyEval_EvalCodeEx+0x13b)[0x540f9b]
/home/ubuntu/GET-Services_mssql/env_mssql/bin/python[0x4ebe37]