Open rieneverts opened 4 months ago
That's what I did to add the extension which u can then configure in the UI
cd /var/www/superset
. venv/bin/activate
pip3 install pymysql mysql-connector-python mysqlclient
deactivate
I still seem to get the error
(venv) root@educationwarehouse:/var/www/superset# pip3 install pymysql mysql-connector-python mysqlclient
Collecting pymysql
Downloading PyMySQL-1.1.1-py3-none-any.whl (44 kB)
|████████████████████████████████| 44 kB 1.2 MB/s
dCollecting mysql-connector-python
Downloading mysql_connector_python-8.4.0-cp39-cp39-manylinux_2_17_x86_64.whl (19.4 MB)
|████████████████████████████████| 19.4 MB 13.4 MB/s
Collecting mysqlclient
Using cached mysqlclient-2.2.4.tar.gz (90 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /var/www/superset/venv/bin/python3 /tmp/tmpbxitpo2__in_process.py get_requires_for_build_wheel /tmp/tmp6n_qqy4b
cwd: /tmp/pip-install-vy6jghet/mysqlclient_ef2fd23b21b543dcb464f3f29705ad1f
Complete output (27 lines):
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
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.
Traceback (most recent call last):
File "/tmp/tmpbxitpo2__in_process.py", line 280, in <module>
main()
File "/tmp/tmpbxitpo2__in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/tmpbxitpo2__in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-wxij91p_/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "/tmp/pip-build-env-wxij91p_/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-wxij91p_/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 155, 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
Managed to fix it by adding this step:
(venv) root@educationwarehouse:/var/www/superset# sudo apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9).
build-essential set to manually installed.
pkg-config is already the newest version (0.29.2-1).
python3-dev is already the newest version (3.9.2-3).
python3-dev set to manually installed.
The following additional packages will be installed:
libmariadb-dev libmariadb-dev-compat
The following NEW packages will be installed:
default-libmysqlclient-dev libmariadb-dev libmariadb-dev-compat
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Need to get 225 kB of archives.
After this operation, 894 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.nl.debian.org/debian bullseye/main amd64 libmariadb-dev amd64 1:10.5.23-0+deb11u1 [185 kB]
Get:2 http://ftp.nl.debian.org/debian bullseye/main amd64 libmariadb-dev-compat amd64 1:10.5.23-0+deb11u1 [36.0 kB]
Get:3 http://ftp.nl.debian.org/debian bullseye/main amd64 default-libmysqlclient-dev amd64 1.0.7 [3,936 B]
Fetched 225 kB in 0s (1,777 kB/s)
Selecting previously unselected package libmariadb-dev.
(Reading database ... 74113 files and directories currently installed.)
Preparing to unpack .../libmariadb-dev_1%3a10.5.23-0+deb11u1_amd64.deb ...
Unpacking libmariadb-dev (1:10.5.23-0+deb11u1) ...
Selecting previously unselected package libmariadb-dev-compat:amd64.
Preparing to unpack .../libmariadb-dev-compat_1%3a10.5.23-0+deb11u1_amd64.deb ...
Unpacking libmariadb-dev-compat:amd64 (1:10.5.23-0+deb11u1) ...
Selecting previously unselected package default-libmysqlclient-dev:amd64.
Preparing to unpack .../default-libmysqlclient-dev_1.0.7_amd64.deb ...
Unpacking default-libmysqlclient-dev:amd64 (1.0.7) ...
Setting up libmariadb-dev (1:10.5.23-0+deb11u1) ...
Setting up libmariadb-dev-compat:amd64 (1:10.5.23-0+deb11u1) ...
Setting up default-libmysqlclient-dev:amd64 (1.0.7) ...
Processing triggers for man-db (2.9.4-2) ...
Updating coolwsd systemplate
(venv) root@educationwarehouse:/var/www/superset# pip3 install pymysql mysql-connector-python mysqlclient
Collecting pymysql
Using cached PyMySQL-1.1.1-py3-none-any.whl (44 kB)
Collecting mysql-connector-python
Downloading mysql_connector_python-9.0.0-cp39-cp39-manylinux_2_17_x86_64.whl (19.3 MB)
|████████████████████████████████| 19.3 MB 6.8 MB/s
Collecting mysqlclient
Using cached mysqlclient-2.2.4.tar.gz (90 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (PEP 517) ... done
Created wheel for mysqlclient: filename=mysqlclient-2.2.4-cp39-cp39-linux_x86_64.whl size=130376 sha256=186dbc6d08f2673ffbf71696b6a65d55d730463385aa1c975e3a77be9f8675dc
Stored in directory: /root/.cache/pip/wheels/df/23/68/faa07b93488a130b3295ca4e91574e85a9dc4764cd463bc152
Successfully built mysqlclient
Installing collected packages: pymysql, mysqlclient, mysql-connector-python
Successfully installed mysql-connector-python-9.0.0 mysqlclient-2.2.4 pymysql-1.1.1
(venv) root@educationwarehouse:/var/www/superset# deactivate
Hiya, is it possible for me to add a mysql datset? I want to connect my nextcloud database to apache superset.
If i try to enter te shell and manually install mysqlclient through pip i get the following error: