This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
pyodbc 4.0.32 installation getting failed in airflow 2.4.0 base docker image #29509
Closed
1 of 2 tasks
Apache Airflow version
Other Airflow 2 version (please specify below)
What happened
The pyodbc 4.0.32 package installation fails when we try to install it in apache/airflow:2.4.0-python3.9. Pyodbc package has dependency on unixodbc-dev package.
So recently after building the docker image with apache/airflow:2.4.0-python3.9 as base unixodbc-dev version got updated to 2.3.11. previous to this build the version of unixodbc-dev was 2.3.7. After this update of unixodbc-dev to 2.3.11 we are getting following error during installation of pyodbc 4.0.32 package.
Error message:
`Building wheels for collected packages: pyodbc
Building wheel for pyodbc (setup.py): started
Building wheel for pyodbc (setup.py): finished with status 'error'
�[91m error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
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 -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYODBC_VERSION=4.0.32 -I/usr/local/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 /usr/include/sql.h:19,
from src/pyodbc.h:56,
from src/buffer.cpp:12:
/usr/include/sqltypes.h:56:10: fatal error: unixodbc.h: No such file or directory
56 | #include "unixodbc.h"
| ^~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
�[0m�[91m ERROR: Failed building wheel for pyodbc
�[0m Running setup.py clean for pyodbc
Failed to build pyodbc
`
What you think should happen instead
The pyodbc 4.0.32 package should be installed succesfully in docker image having airflow base image without any issue.
How to reproduce
Create any docker image with apache/airflow:2.4.0-python3.9 as base image and try to install pyodbc 4.0.32 in the same.
Operating System
Linux-debian
Versions of Apache Airflow Providers
No response
Deployment
Other Docker-based deployment
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: