Hi guys,
I using with astronomer locally by using docker Get started with Airflow using the Astro CLI | Astronomer Documentation
with this version in the Dokerfile FROM Quay
when I try to install this package apache-airflow-providers-mysql by adding the package name to requirements.txt file i get this errors:
3.718 Downloading mysqlclient-2.2.0.tar.gz (89 kB)
3.809 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 927.3 kB/s eta 0:00:00
3.828 Installing build dependencies: started
8.295 Installing build dependencies: finished with status ‘done’
8.295 Getting requirements to build wheel: started
8.414 Getting requirements to build wheel: finished with status ‘error’
8.417 error: subprocess-exited-with-error
8.417
8.417 × Getting requirements to build wheel did not run successfully.
8.417 │ exit code: 1
8.417 ╰─> [27 lines of output]
8.417 /bin/sh: 1: pkg-config: not found
8.417 /bin/sh: 1: pkg-config: not found
8.417 Trying pkg-config --exists mysqlclient
8.417 Command ‘pkg-config --exists mysqlclient’ returned non-zero exit status 127.
8.417 Trying pkg-config --exists mariadb
8.417 Command ‘pkg-config --exists mariadb’ returned non-zero exit status 127.
8.417 Traceback (most recent call last):
8.417 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in
8.417 main()
8.417 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 335, in main
8.417 json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
8.417 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8.417 File “/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 118, in get_requires_for_build_wheel
8.417 return hook(config_settings)
8.417 ^^^^^^^^^^^^^^^^^^^^^
8.417 File “/tmp/pip-build-env-rso5c9e9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 355, in get_requires_for_build_wheel
8.417 return self._get_build_requires(config_settings, requirements=[‘wheel’])
8.417 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8.417 File “/tmp/pip-build-env-rso5c9e9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 325, in _get_build_requires
8.417 self.run_setup()
8.417 File “/tmp/pip-build-env-rso5c9e9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 341, in run_setup
8.417 exec(code, locals())
8.417 File “”, line 154, in
8.417 File “”, line 48, in get_config_posix
8.417 File “”, line 27, in find_package_name
8.417 Exception: Can not find valid pkg-config name.
8.417 Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
8.417 [end of output]
8.417
8.417 note: This error originates from a subprocess, and is likely not a problem with pip.
8.418 error: subprocess-exited-with-error
8.418
8.418 × Getting requirements to build wheel did not run successfully.
8.418 │ exit code: 1
8.418 ╰─> See above for output.
8.418
8.418 note: This error originates from a subprocess, and is likely not a problem with pip.
please advice
Hey @davidmr6,
I was able to reproduce the error with provider apache-airflow-providers-mysql
and Astro Runtime 9.2.0 (Airflow 2.7.2)
Resolved this by including the following
packages in packages.txt
gcc
libmariadb-dev-compat
and following providers in requirements.txt
apache-airflow-providers-mysql==5.4.0
mysqlclient==2.1.0
Please try, this should work!
2 Likes
@iamakashladdha thanks is it work fine
1 Like