GitHub user gatos-cc added a comment to the discussion: ModuleNotFoundError: No
module named 'psycopg2' during k8 installation
OK - I had an extra line break '\' at the end of the pip install. Removed that
and I have
```
bootstrapScript: |
#!/bin/bash
# Install system-level dependencies
apt-get update && apt-get install -y
uv pip install \
authlib \
psycopg2-binary \
mysqlclient
# Create bootstrap file if it doesn't exist
if [ ! -f ~/bootstrap ]; then
echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap
fi
```
Still errors:
```
Downloading psycopg2-binary (4.2MiB)
Building mysqlclient==2.2.7
Downloading psycopg2-binary
× Failed to build `mysqlclient==2.2.7`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
[stdout]
Trying pkg-config --exists mysqlclient
Command 'pkg-config --exists mysqlclient' returned non-zero exit status
127.
Trying pkg-config --exists mariadb
Command 'pkg-config --exists mariadb' returned non-zero exit status 127.
Trying pkg-config --exists libmariadb
Command 'pkg-config --exists libmariadb' returned non-zero exit status
127.
Trying pkg-config --exists perconaserverclient
Command 'pkg-config --exists perconaserverclient' returned non-zero exit
status 127.
[stderr]
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
Traceback (most recent call last):
File "<string>", line 14, in <module>
File
"/app/superset_home/.cache/uv/builds-v0/.tmpYxLs4S/lib/python3.10/site-packages/setuptools/build_meta.py",
line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File
"/app/superset_home/.cache/uv/builds-v0/.tmpYxLs4S/lib/python3.10/site-packages/setuptools/build_meta.py",
line 301, in _get_build_requires
self.run_setup()
File
"/app/superset_home/.cache/uv/builds-v0/.tmpYxLs4S/lib/python3.10/site-packages/setuptools/build_meta.py",
line 317, in run_setup
exec(code, locals())
File "<string>", line 156, in <module>
File "<string>", line 49, in get_config_posix
File "<string>", line 28, in find_package_name
Exception: Can not find valid pkg-config name.
Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
hint: This usually indicates a problem with the package or the build
environment.
...
ModuleNotFoundError: No module named 'psycopg2'
```
So its failing to build mysqlclient, which I guess is a requirement for
psycopg2. But unclear how to specify `MYSQLCLIENT_CFLAGS and
MYSQLCLIENT_LDFLAGS` or `valid pkg-config`....
GitHub link:
https://github.com/apache/superset/discussions/31431#discussioncomment-14768182
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]