Environment
- OS: Ubuntu 24 on Intel
- linkml-store version: 0.3.0rc3
- Python: 3.11
Problem
Running a basic query command requires installing analytics and scipy extras, even though the query has nothing to do with plotting or scientific computing.
Minimal reproduction
uv sync # base install only
uv run linkml-store -d "dremio-rest://lakehouse.jgi.lbl.gov" -c mytable query -l 3 -O csv
Error:
ModuleNotFoundError: No module named 'matplotlib'
After installing --extra analytics:
ModuleNotFoundError: No module named 'scipy'
Root cause
cli.py line 28 has an unconditional import:
from linkml_store.plotting.cli import plot_cli
This import chain requires:
matplotlib (from analytics extra)
scipy (from scipy extra, but not included in analytics)
Additional warnings without more extras
Even after installing analytics + scipy, there are warnings unless you also install llm and map extras:
Error importing linkml_store.inference.implementations.llm_inference_engine: No module named 'llm'
Error importing linkml_store.inference.implementations.sklearn_inference_engine: No module named 'linkml_map'
Error importing linkml_store.inference.implementations.rag_inference_engine: No module named 'llm'
Error importing linkml_store.inference.implementations.rule_based_inference_engine: No module named 'linkml_map'
Current workaround
Must install 4 extras for a clean basic query:
uv sync --extra analytics --extra scipy --extra llm --extra map
Suggested fixes
- Lazy imports for
plotting and inference modules - only import when those subcommands are invoked
- Fix
analytics extra to include scipy since plotting/heatmap.py requires it
- Silence or demote the inference engine import errors to debug level when those features aren't being used
Impact
The README shows pip install linkml-store[all] which works, but users trying to install minimal dependencies for specific use cases (e.g., just dremio-rest queries) hit confusing errors.
Environment
Problem
Running a basic query command requires installing
analyticsandscipyextras, even though the query has nothing to do with plotting or scientific computing.Minimal reproduction
Error:
After installing
--extra analytics:Root cause
cli.pyline 28 has an unconditional import:This import chain requires:
matplotlib(fromanalyticsextra)scipy(fromscipyextra, but not included inanalytics)Additional warnings without more extras
Even after installing analytics + scipy, there are warnings unless you also install
llmandmapextras:Current workaround
Must install 4 extras for a clean basic query:
Suggested fixes
plottingandinferencemodules - only import when those subcommands are invokedanalyticsextra to includescipysinceplotting/heatmap.pyrequires itImpact
The README shows
pip install linkml-store[all]which works, but users trying to install minimal dependencies for specific use cases (e.g., just dremio-rest queries) hit confusing errors.