Try to install libiodbc2-dev first. You are missing the sql.h which is
provided by that package.
On Wednesday, July 28, 2021 at 6:50:17 PM UTC+9 [email protected] wrote:
> Hi All,
>
> could someone help me here,
> Facing pyodbc installation issue.
>
> command:
> pip install pyodbc
>
>
> error:
> =====
>
> Collecting pyodbc
> Downloading pyodbc-4.0.31.tar.gz (280 kB)
> |████████████████████████████████| 280 kB 4.6 MB/s eta 0:00:01
> Building wheels for collected packages: pyodbc
> Building wheel for pyodbc (setup.py) ... error ERROR: Command errored out
> with exit status 1:
> command: /srv/conda/envs/notebook/bin/python -u -c 'import sys,
> setuptools, tokenize; sys.argv[0] =
> '"'"'/tmp/pip-install-lx0nvnbu/pyodbc_bde09eeb034e4518acf81d3236cbabbf/setup.py'"'"';
>
> __file__='"'"'/tmp/pip-install-lx0nvnbu/pyodbc_bde09eeb034e4518acf81d3236cbabbf/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-szs7gw8z
> cwd: /tmp/pip-install-lx0nvnbu/pyodbc_bde09eeb034e4518acf81d3236cbabbf/
> Complete output (15 lines):
> running bdist_wheel
> running build
> running build_ext
> building 'pyodbc' extension
> creating build
> creating build/temp.linux-x86_64-3.7
> creating build/temp.linux-x86_64-3.7/src
> /srv/conda/envs/notebook/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result
> -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona
> -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2
> -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC
> -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell
> -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2
> -ffunction-sections -pipe -isystem /srv/conda/envs/notebook/include -DNDEBUG
> -D_FORTIFY_SOURCE=2 -O2 -isystem /srv/conda/envs/notebook/include -fPIC
> -DPYODBC_VERSION=4.0.31 -I/srv/conda/envs/notebook/include/python3.7m -c
> src/buffer.cpp -o build/temp.linux-x86_64-3.7/src/buffer.o -Wno-write-strings
> cc1plus: warning: command line option '-Wstrict-prototypes' is valid for
> C/ObjC but not for C++
> 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.
> error: command '/srv/conda/envs/notebook/bin/x86_64-conda-linux-gnu-cc'
> failed with exit status 1
>
>
>
>
> screenshot for the same.
> [image: image.png]
>
--
You received this message because you are subscribed to the Google Groups
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jupyter/41f8ab2c-43a1-43da-bc13-049833cd0d95n%40googlegroups.com.