Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyodbc 4.0.32 installation getting failed in airflow 2.4.0 base docker image #29509

Closed
1 of 2 tasks
Amey2400 opened this issue Feb 13, 2023 · 1 comment
Closed
1 of 2 tasks
Labels
area:core kind:bug This is a clearly a bug

Comments

@Amey2400
Copy link

Amey2400 commented Feb 13, 2023

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?

  • Yes I am willing to submit a PR!

Code of Conduct

@Amey2400 Amey2400 added area:core kind:bug This is a clearly a bug labels Feb 13, 2023
@Amey2400
Copy link
Author

Recently one issue in microsoft is raised for unixodbc-2.3.11 for the same issue missing unixodbc.h file.
microsoft/linux-package-repositories#36

@apache apache locked and limited conversation to collaborators Feb 13, 2023
@potiuk potiuk converted this issue into discussion #29510 Feb 13, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area:core kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

1 participant