Files
gh-k-dense-ai-claude-scient…/skills/denario/references/installation.md
2025-11-30 08:30:10 +08:00

3.8 KiB

Installation Guide

System Requirements

  • Python: Version 3.12 or higher (required)
  • Operating System: Linux, macOS, or Windows
  • Virtual Environment: Recommended for isolation
  • LaTeX: Required for paper generation (or use Docker)

Installation Methods

The uv package manager provides fast, reliable dependency resolution:

# Initialize a new project
uv init

# Add denario with app support
uv add "denario[app]"

Method 2: Alternative Installation

Alternative installation using pip:

# Create virtual environment (recommended)
python3 -m venv denario_env
source denario_env/bin/activate  # On Windows: denario_env\Scripts\activate

# Install denario
uv pip install "denario[app]"

Method 3: Building from Source

For development or customization:

# Clone the repository
git clone https://github.com/AstroPilot-AI/Denario.git
cd Denario

# Create virtual environment
python3 -m venv Denario_env
source Denario_env/bin/activate

# Install in editable mode
uv pip install -e .

Method 4: Docker Deployment

Docker provides a complete environment with all dependencies including LaTeX:

# Pull the official image
docker pull pablovd/denario:latest

# Run the container with GUI
docker run -p 8501:8501 --rm pablovd/denario:latest

# Run with environment variables (for API keys)
docker run -p 8501:8501 --env-file .env --rm pablovd/denario:latest

Access the GUI at http://localhost:8501 after the container starts.

Verifying Installation

After installation, verify denario is available:

# Test import
python -c "from denario import Denario; print('Denario installed successfully')"

Or check the version:

python -c "import denario; print(denario.__version__)"

Launching the Application

Command-Line Interface

Run the graphical user interface:

denario run

This launches a web-based Streamlit application for interactive research workflow management.

Programmatic Usage

Use denario directly in Python scripts:

from denario import Denario

den = Denario(project_dir="./my_project")
# Continue with workflow...

Dependencies

Denario automatically installs key dependencies:

  • AG2: Agent orchestration framework
  • LangGraph: Graph-based agent workflows
  • pandas: Data manipulation
  • scikit-learn: Machine learning tools
  • matplotlib/seaborn: Visualization
  • streamlit: GUI framework (with [app] extra)

LaTeX Setup

For paper generation, LaTeX must be available:

Linux

sudo apt-get install texlive-full

macOS

brew install --cask mactex

Windows

Download and install MiKTeX or TeX Live.

Docker Alternative

The Docker image includes a complete LaTeX installation, eliminating manual setup.

Troubleshooting Installation

Python Version Issues

Ensure Python 3.12+:

python --version

If older, install a newer version or use pyenv for version management.

Virtual Environment Activation

Linux/macOS:

source venv/bin/activate

Windows:

venv\Scripts\activate

Permission Errors

Use --user flag or virtual environments:

uv pip install --user "denario[app]"

Docker Port Conflicts

If port 8501 is in use, map to a different port:

docker run -p 8502:8501 --rm pablovd/denario:latest

Package Conflicts

Create a fresh virtual environment to avoid dependency conflicts.

Updating Denario

uv

uv add --upgrade denario

pip

uv pip install --upgrade "denario[app]"

Docker

docker pull pablovd/denario:latest

Uninstallation

uv

uv remove denario

pip

uv pip uninstall denario

Docker

docker rmi pablovd/denario:latest