LaminDB
raw JSON → 2.4.2 verified Sat May 09 auth: no python
A full/meta-package for the LaminDB data management ecosystem, unifying modules like `lamin_lamindb`, `lamindb_setup`, and `bionty` into a single import. Current stable version 2.4.2 requires Python 3.10–3.14. The library is actively maintained with monthly releases.
pip install lamindb Common errors
error ModuleNotFoundError: No module named 'lamindb' ↓
cause Package not installed or Python environment path issue.
fix
Run
pip install lamindb in the correct environment (Python 3.10-3.14). error lamindb.core.exceptions.SetupError: No LaminDB instance configured. Please call ln.setup.init() or set LAMIN_INSTANCE_ID. ↓
cause No instance is configured; environment variables missing.
fix
Set
LAMIN_INSTANCE_ID env var or call ln.setup.init(storage='./mydata'). error AttributeError: module 'lamindb' has no attribute 'Artifact' ↓
cause Wrong import style or out-of-date version.
fix
Use
import lamindb as ln then ln.Artifact. Update with pip install --upgrade lamindb. error TypeError: Artifact.from_file() got an unexpected keyword argument 'version' ↓
cause The `version` parameter was removed in v2.3.0.
fix
Remove
version from the call; use ln.Artifact.from_file(path, description='...'). Warnings
breaking Migration from v1 to v2: The entire data model changed. `File` became `Artifact`, `Storage` became `Collection`, and `Project`/`Experiment` relations were restructured. Old scripts using v1 classes and queries will not work. ↓
fix Use `lamin migrate` CLI tool to upgrade existing databases; rewrite code using v2 API.
gotcha Do not use `pip install lamindb[all]` for production: it installs optional dependencies (bionty, scanpy, etc.) that may conflict with existing environments. Only install extras you need (e.g., `pip install lamindb[bionty]`). ↓
fix Use `pip install lamindb` and add optional packages individually.
gotcha Importing `lamindb` without first setting up a valid instance or environment will raise `ModuleNotFoundError` or `SetupError`. The env vars `LAMIN_INSTANCE_ID` or `LAMIN_ENVIRONMENT` must be configured (or call `ln.setup.init()` first). ↓
fix Call `ln.setup.init(storage='./local_path', schema='small')` for a local test instance.
deprecated `from lamindb import InMemoryArtifact` and other in-memory only classes are deprecated in 2.4. Use `ln.Artifact` with `memfile=True` parameter instead. ↓
fix Use `ln.Artifact.from_memory(data, key='...')`.
Imports
- ln wrong
from lamindb import lncorrectimport lamindb as ln - ln.Artifact wrong
from lamindb import Artifactcorrectimport lamindb as ln; artifact = ln.Artifact(...) - ln.setup wrong
from lamindb.setup import initcorrectimport lamindb as ln; ln.setup.init(...)
Quickstart
import os
os.environ['LAMIN_INSTANCE_ID'] = 'testinstance'
import lamindb as ln
# Initialize a local test instance (no authentication required)
ln.setup.init(storage='./test_lamin')
# Create a simple artifact
artifact = ln.Artifact.from_file('README.md', description='Test artifact')
artifact.save()
print('Artifact saved:', artifact.id)