Hi Konstantin Markov,
firstly, thank you for your response and for helping me.
As said, I installed libiodbc2-deV, but I got the same error.
could you, kindly help me here.
######################################################################################################
Step 1:
(base) root@fc3a3bc29019:~# pip install pyodbc
Error:
++++++
(base) root@fc3a3bc29019:~# pip install pyodbc
WARNING: The directory '/home/jovyan/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Collecting pyodbc
Downloading pyodbc-4.0.31.tar.gz (280 kB)
|████████████████████████████████| 280 kB 2.4 MB/s
Building wheels for collected packages: pyodbc
Building wheel for pyodbc (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eyrl2bs8/pyodbc_77cb6245f74143008b5a63191361a16c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-eyrl2bs8/pyodbc_77cb6245f74143008b5a63191361a16c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ow0t0mro
cwd: /tmp/pip-install-eyrl2bs8/pyodbc_77cb6245f74143008b5a63191361a16c/
Complete output (14 lines):
running bdist_wheel
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -DPYODBC_VERSION=4.0.31 -I/opt/conda/include/python3.9 -c src/buffer.cpp -o build/temp.linux-x86_64-3.9/src/buffer.o -Wno-write-strings
In file included from src/buffer.cpp:12:
src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory
56 | #include <sql.h>
| ^~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for pyodbc
Running setup.py clean for pyodbc
Failed to build pyodbc
Installing collected packages: pyodbc
Running setup.py install for pyodbc ... error
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eyrl2bs8/pyodbc_77cb6245f74143008b5a63191361a16c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-eyrl2bs8/pyodbc_77cb6245f74143008b5a63191361a16c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4snraduo/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/include/python3.9/pyodbc
cwd: /tmp/pip-install-eyrl2bs8/pyodbc_77cb6245f74143008b5a63191361a16c/
Complete output (14 lines):