Skip to content

Full driver path needed in molab #201

@esadek

Description

@esadek

When using dbc in molab (a cloud-hosted marimo notebook workspace), dbc installs drivers to /tmp/uv-venv/etc/adbc/drivers, while adbc_driver_manager looks for drivers in /etc/adbc/drivers.

Here is a code example:

import subprocess

subprocess.run(["dbc", "install", "duckdb"])
Installed duckdb 1.4.0 to /tmp/uv-venv/etc/adbc/drivers
from adbc_driver_manager import dbapi

con = dbapi.connect(driver="duckdb")
Traceback (most recent call last):
  File "/tmp/marimo_73/__marimo__cell_Hbol_.py", line 3, in <module>
    con = dbapi.connect(driver="duckdb")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/uv-venv/lib/python3.12/site-packages/adbc_driver_manager/dbapi.py", line 251, in connect
    db = _lib.AdbcDatabase(**db_kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "adbc_driver_manager/_lib.pyx", line 605, in adbc_driver_manager._lib.AdbcDatabase.__init__
  File "adbc_driver_manager/_lib.pyx", line 262, in adbc_driver_manager._lib.check_error
adbc_driver_manager.ProgrammingError: NOT_FOUND: [Driver Manager] dlopen() failed: duckdb: cannot open shared object file: No such file or directory
dlopen() failed: libduckdb.so: cannot open shared object file: No such file or directory
Also searched these paths for manifests:
	not set: ADBC_DRIVER_PATH
	not enabled at build time: Conda prefix
	does not exist: /root/.config/adbc/drivers
	does not exist: /etc/adbc/drivers

To get the connection to work, the full path must be given:

con = dbapi.connect(driver="/tmp/uv-venv/etc/adbc/drivers/duckdb")

It would be great if providing the full path was not needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions