Skip to content

Installation

Requirements

Python

  • Tested with Python 3.11 and 3.13.
  • pip for package installation

Install from PyPI

pip install nbdctools

Install from GitHub

pip install "git+https://github.com/nbdc-datahub/nbdctools-py.git"

R-backed

R packages

If you want to use the R-backed create_dataset wrapper, which has full parity with the R create_dataset behavior, you need:

  • System R available on PATH
  • R packages: NBDCtools, NBDCtoolsData

R Library Discovery (R_LIBS_USER)

If R packages were installed with renv and are not discovered by rpy2, export R_LIBS_USER:

export R_LIBS_USER=/path/to/your/renv/library
python your_script.py

For one-off commands:

R_LIBS_USER=/path/to/your/renv/library python your_script.py

Development Setup (Contributors)

If you are working from a cloned repository, use uv:

git clone https://github.com/nbdc-datahub/nbdctools-py.git
cd nbdctools-py

uv sync
uv sync --group dev
uv sync --group docs