I am trying to install pyodbc in my docker container launched using lambci/lambda:build-python3.8 image.
Command : pip install pyodbc
I receive below error.
bash-4.2# pip install pyodbc
Collecting pyodbc
Using cached pyodbc-4.0.30.tar.gz (266 kB)
Building wheels for collected packages: pyodbc
Building wheel for pyodbc (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /var/lang/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/p
ip-install-vp296l1s/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vp296l1s/pyodbc/setup.py'"'"'
;f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"
');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_0gnru3p
cwd: /tmp/pip-install-vp296l1s/pyodbc/
Complete output (14 lines):
running bdist_wheel
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYODBC_VERSION=
4.0.30 -I/var/lang/include/python3.8 -c src/buffer.cpp -o build/temp.linux-x86_64-3.8/src/buffer.o -Wn
o-write-strings
In file included from src/buffer.cpp:12:0:
src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory
#include <sql.h>
^~~~~~~
compilation terminated.
Can someone please tell me how to resolve this.