Files
local-deep-research/docs/install-pip.md
LearningCircuit ec91c5c716 fix(pdf): render CJK characters in exported PDFs (#4055) (#4058)
* fix(pdf): render CJK characters in exported PDFs (#4055)

The PDF stylesheet hard-coded a Latin-only font stack, so WeasyPrint
silently dropped Chinese/Japanese/Korean glyphs from downloads even
when they rendered fine in the HTML view. Add Noto Sans CJK /
Microsoft YaHei / SimSun fallbacks for both body and monospace
families, and install fonts-noto-cjk in the Docker runtime stage so
the slim base image actually has glyph coverage.

Non-Docker installs still need a CJK font package on the host.

* fix(pdf): broaden CJK font fallbacks + document host requirement

Extend the PDF CSS font stack to cover macOS (PingFang, Hiragino,
Apple SD Gothic Neo) and additional Windows families (Microsoft
JhengHei, Yu Gothic, Malgun Gothic), so pip installs on those
platforms render CJK without any user action.

Document the per-distro CJK font install command in install-pip.md
and add a new FAQ entry. Linux pip/server hosts still need
fonts-noto-cjk installed manually — there is no in-code way to fix
that without bundling ~20 MB of fonts into the wheel.

* test(pdf): assert CJK glyph embedding end-to-end (#4055)

Round-trip CJK text through markdown → PDF → pypdf extract_text so CI
fails if fonts-noto-cjk is ever removed from the Docker runtime image.
The pytest-tests job runs inside that image, so the test sees the
installed fonts; bare hosts without CJK fonts skip the assertion via
an fc-list gate.

Does not catch CSS-fallback-stack regressions on its own: fontconfig
auto-substitutes a CJK family on Linux even for a Latin-only stack.
The CSS fallbacks still matter on Windows/macOS, which CI does not
exercise — documented in the test docstring.
2026-05-16 13:12:28 +02:00

2.4 KiB

Python Package (pip) Installation Guide

Note: For most users, Docker is preferred as it handles all dependencies automatically. pip install is best suited for developers or users who want to integrate LDR into existing Python projects.

Quick Install

# Step 1: Install the package
pip install local-deep-research

# Step 2: Setup SearXNG for best results
docker pull searxng/searxng
docker run -d -p 8080:8080 --name searxng searxng/searxng

# Step 3: Install Ollama from https://ollama.ai

# Step 4: Download a model
ollama pull gemma3:12b

# Step 5: Start the web interface
ldr-web

Open http://localhost:5000 after a few seconds.

SQLCipher (Database Encryption)

LDR uses SQLCipher for AES-256 encrypted databases. Pre-built sqlcipher3 wheels are available for Windows, macOS, and Linux — most users won't need to compile anything.

  • Full setup instructions: SQLCipher Install Guide
  • Skip encryption: If you don't need database encryption, set export LDR_BOOTSTRAP_ALLOW_UNENCRYPTED=true to use standard SQLite instead. API keys and data will be stored unencrypted.
  • Docker: Includes SQLCipher out of the box — no extra setup needed.

Optional Dependencies

MCP Server

For integration with Claude Desktop or Claude Code:

pip install "local-deep-research[mcp]"

Platform Notes

Windows PDF Export: PDF export requires Pango/Cairo system libraries. See the WeasyPrint installation guide for setup instructions.

CJK characters in PDF exports: WeasyPrint resolves glyphs through the host's installed fonts. If your research results contain Chinese, Japanese, or Korean characters and they disappear from the downloaded PDF, install a CJK font package:

  • Debian/Ubuntu: sudo apt install fonts-noto-cjk && fc-cache -fv
  • Fedora/RHEL: sudo dnf install google-noto-sans-cjk-fonts && fc-cache -fv
  • Alpine: apk add font-noto-cjk
  • macOS: ships with PingFang / Hiragino — no install needed.
  • Windows: ships with Microsoft YaHei / SimSun — no install needed.

Docker users on the official image do not need to do anything; fonts-noto-cjk is bundled.

Development from Source

For contributing or running from the latest code, see the Development Guide.


Back to Installation Overview