Intelligently sets up Python virtual environment with required packages. Detects existing Python installations and guides users if Python is missing.
Details
This function:
Automatically detects if Python is already installed
Offers to install Miniconda if no Python found
Creates an isolated virtual environment (does NOT modify system Python)
Installs ONLY 6 core packages (minimal installation):
langchain-core (core LangChain functionality)
langchain-ollama (Ollama integration)
langgraph (workflow graphs)
langgraph-checkpoint (workflow state management)
ollama (Ollama client)
pdfplumber (PDF table extraction)
Dependencies installed automatically by pip
Avoids heavy packages (no marker-pdf, nougat-ocr, torch)
The virtual environment approach means:
No conflicts with other Python projects
Easy to remove (just delete the environment)
System Python remains untouched
Much smaller download (~100MB vs 5GB+)
After setup, restart R session to activate enhanced features.
