Installation¶
Install instructions for TNH Scholar, a Python package for text processing and analysis, using pip.
Simple install:
System Requirements¶
- Python 3.12.4
- OpenAI API key for AI-powered features
- Git (for prompt version control)
Installation Options¶
Basic Installation¶
For basic usage:
Feature-Specific Installation¶
Install optional components based on your needs:
- OCR capabilities:
pip install "tnh-scholar[ocr]" - GUI tools:
pip install "tnh-scholar[gui]" - Query features:
pip install "tnh-scholar[query]" - Development tools:
pip install "tnh-scholar[dev]"
Configuration¶
- Set your OpenAI API key:
Or add it to your .env file.
- Run the setup tool:
This will: - Create the configuration directory (~/.config/tnh-scholar) - Download default prompts - Set up initial configuration
Verification¶
Verify your installation:
You should see output like:
Test the CLI:
Common Issues¶
-
Missing API Key If you see authentication errors, ensure OPENAI_API_KEY is set correctly.
-
Python Version Mismatch TNH Scholar requires Python 3.12.4 exactly. Check your version:
For troubleshooting, see our GitHub Issues.