[GH-ISSUE #22479] issue: pip install fails when MariaDB Connector/C is not installed (mariadb_config not found) #35248

Closed
opened 2026-04-25 09:28:54 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ShirasawaSama on GitHub (Mar 9, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22479

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

v0.8.10

Ollama Version (if applicable)

No response

Operating System

MacOS 26.1

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

  • Running pip install -r backend/requirements.txt (or installing backend dependencies via the project’s normal setup) completes successfully on a clean environment (e.g. new venv on macOS) without requiring system-level MariaDB libraries.
  • Optional features (e.g. MariaDB vector DB) may require extra setup; core install should not depend on MariaDB Connector/C being present.

Actual Behavior

  • pip install -r backend/requirements.txt fails while building the mariadb package with:
    • mariadb_config: command not found
    • OSError: mariadb_config not found
  • Error states that MariaDB Connector/C must be preinstalled. On systems where it is not installed (e.g. default macOS, minimal Docker image), the full backend dependency install fails even when MariaDB is not used.

Steps to Reproduce

  1. On a machine without MariaDB Connector/C (e.g. macOS without brew install mariadb-connector-c):
    • Clone the repo and create a virtualenv:
      python -m venv .venv
      source .venv/bin/activate   # or .venv\Scripts\activate on Windows
      
  2. Install backend requirements:
    pip install -r backend/requirements.txt
    
  3. Observe the install fail when building the mariadb wheel, with mariadb_config not found / OSError: mariadb_config not found.

Logs & Screenshots

Collecting mariadb==1.1.14 (from -r requirements.txt (line 122))
  Using cached mariadb-1.1.14.tar.gz (111 kB)
  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
  ╰─> [34 lines of output]
      /bin/sh: mariadb_config: command not found
      Traceback (most recent call last):
        File "/Users/<user>/code/open-webui/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/<user>/code/open-webui/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/<user>/code/open-webui/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-build-env-fntad6la/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-build-env-fntad6la/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-build-env-fntad6la/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 520, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-build-env-fntad6la/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 27, in <module>
        File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-install-pr87qh7l/mariadb_6587124245214b98b1bd4dc2bc191106/mariadb_posix.py", line 62, in get_config
          cc_version = mariadb_config(config_prg, "cc_version")
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-install-pr87qh7l/mariadb_6587124245214b98b1bd4dc2bc191106/mariadb_posix.py", line 28, in mariadb_config
          raise EnvironmentError(
      OSError: mariadb_config not found.
      
      This error typically indicates that MariaDB Connector/C, a dependency which
      must be preinstalled, is not found.
      If MariaDB Connector/C is not installed, see installation instructions
      If MariaDB Connector/C is installed, either set the environment variable
      MARIADB_CONFIG or edit the configuration file 'site.cfg' to set the
       'mariadb_config' option to the file location of the mariadb_config utility.
      
      [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.

Additional Information

No response

Originally created by @ShirasawaSama on GitHub (Mar 9, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22479 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version v0.8.10 ### Ollama Version (if applicable) _No response_ ### Operating System MacOS 26.1 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior - Running `pip install -r backend/requirements.txt` (or installing backend dependencies via the project’s normal setup) completes successfully on a clean environment (e.g. new venv on macOS) without requiring system-level MariaDB libraries. - Optional features (e.g. MariaDB vector DB) may require extra setup; core install should not depend on MariaDB Connector/C being present. ### Actual Behavior - `pip install -r backend/requirements.txt` fails while building the `mariadb` package with: - `mariadb_config: command not found` - `OSError: mariadb_config not found` - Error states that **MariaDB Connector/C** must be preinstalled. On systems where it is not installed (e.g. default macOS, minimal Docker image), the full backend dependency install fails even when MariaDB is not used. ### Steps to Reproduce 1. On a machine **without** MariaDB Connector/C (e.g. macOS without `brew install mariadb-connector-c`): - Clone the repo and create a virtualenv: ```bash python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows ``` 2. Install backend requirements: ```bash pip install -r backend/requirements.txt ``` 3. Observe the install fail when building the `mariadb` wheel, with `mariadb_config not found` / `OSError: mariadb_config not found`. ### Logs & Screenshots ``` Collecting mariadb==1.1.14 (from -r requirements.txt (line 122)) Using cached mariadb-1.1.14.tar.gz (111 kB) 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 ╰─> [34 lines of output] /bin/sh: mariadb_config: command not found Traceback (most recent call last): File "/Users/<user>/code/open-webui/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/Users/<user>/code/open-webui/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/<user>/code/open-webui/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-build-env-fntad6la/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-build-env-fntad6la/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires self.run_setup() File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-build-env-fntad6la/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 520, in run_setup super().run_setup(setup_script=setup_script) File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-build-env-fntad6la/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 27, in <module> File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-install-pr87qh7l/mariadb_6587124245214b98b1bd4dc2bc191106/mariadb_posix.py", line 62, in get_config cc_version = mariadb_config(config_prg, "cc_version") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/ww/9kfk66mj1t1fg89j9f3t847h0000gn/T/pip-install-pr87qh7l/mariadb_6587124245214b98b1bd4dc2bc191106/mariadb_posix.py", line 28, in mariadb_config raise EnvironmentError( OSError: mariadb_config not found. This error typically indicates that MariaDB Connector/C, a dependency which must be preinstalled, is not found. If MariaDB Connector/C is not installed, see installation instructions If MariaDB Connector/C is installed, either set the environment variable MARIADB_CONFIG or edit the configuration file 'site.cfg' to set the 'mariadb_config' option to the file location of the mariadb_config utility. [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. ``` ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 09:28:54 -05:00
Author
Owner

@ShirasawaSama commented on GitHub (Mar 9, 2026):

I suggest to make mariadb optional in backend/requirements.txt, consistent with pyproject.toml where it's already under [project.optional-dependencies]mariadb. Only require it when the user enables MariaDB (e.g. vector DB). Document that installing the optional mariadb extra (or the mariadb line in requirements) requires MariaDB Connector/C to be installed first (and link to installation instructions per OS).

<!-- gh-comment-id:4021010542 --> @ShirasawaSama commented on GitHub (Mar 9, 2026): I suggest to make `mariadb` optional in `backend/requirements.txt`, consistent with `pyproject.toml` where it's already under `[project.optional-dependencies]` → `mariadb`. Only require it when the user enables MariaDB (e.g. vector DB). Document that installing the optional `mariadb` extra (or the mariadb line in requirements) requires MariaDB Connector/C to be installed first (and link to installation instructions per OS).
Author
Owner

@tjbck commented on GitHub (Mar 11, 2026):

Removed from requirements.txt

<!-- gh-comment-id:4041972549 --> @tjbck commented on GitHub (Mar 11, 2026): Removed from requirements.txt
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35248