Replies: 2 comments
-
You probably need to have the mysql and mariadb client binaries installed on your system first? mysqlclient requirementsFrom the pypi page:
|
Beta Was this translation helpful? Give feedback.
-
Yes thanks very much - I made some further headway by installing the pkg-config (surprise). I ran your commands successfully as root. I now have this issue when running pip3 install mysqlclient mariadb (env) inventree@wh1:/opt/inventree$ pip3 install mysqlclient mariadb × Getting requirements to build wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've installed the InvenTree Debian Bullseye package which by default installs with sqlite3. I'm trying to change the db driver to MySQL but I'm running into this issue when installing the python bindings from instructions on this page: https://docs.inventree.org/en/latest/start/install/?h=mysql#mysql-mariadb
I do see the error: "Can not find valid pkg-config name.", but I'm not sure where to from there. Any advice would be greatly appreciated. Here is my error:
(env) inventree@wh1:/opt/inventree$ pip3 install mysqlclient mariadb
Collecting mysqlclient
Downloading mysqlclient-2.2.0.tar.gz (89 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 734.5 kB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
/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.
Traceback (most recent call last):
File "/opt/inventree/env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/opt/inventree/env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/inventree/env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-i2mi4old/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-i2mi4old/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-i2mi4old/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 154, in
File "", line 48, in get_config_posix
File "", line 27, in find_package_name
Exception: Can not find valid pkg-config name.
Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Beta Was this translation helpful? Give feedback.
All reactions