To install MySQL related operators and connections, include the following python package in the requirements.txt
file.
apache-airflow-providers-mysql
Since the mysql provider installs other python packages that requires binaries to build, the following system level packages will need to be included in the packages.txt
file.
default-libmysqlclient-dev
build-essential
pkg-config
Missing binaries
If the system level packages are missing, the docker build process will result in the following error
WARNING: Discarding https://files.pythonhosted.org/packages/74/ff/4e964e20b559e55d7afa60fbccc6a560f2adf289813bd3d7eb4eb8a87093/mysqlclient-1.3.7.tar.gz#sha256=c74a83b4cb2933d0e43370117eeebdfa03077ae72686d2df43d31879267f1f1b (from https://pypi.org/simple/mysqlclient/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uzja_c83/mysqlclient_0d74721126384e60a3c396ea56cca319/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uzja_c83/mysqlclient_0d74721126384e60a3c396ea56cca319/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'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-aoyi8ybj
cwd: /tmp/pip-install-uzja_c83/mysqlclient_0d74721126384e60a3c396ea56cca319/
Complete output (10 lines):
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uzja_c83/mysqlclient_0d74721126384e60a3c396ea56cca319/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-install-uzja_c83/mysqlclient_0d74721126384e60a3c396ea56cca319/setup_posix.py", line 47, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-install-uzja_c83/mysqlclient_0d74721126384e60a3c396ea56cca319/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
Comments
0 comments
Please sign in to leave a comment.