title | publishedAt | updatedAt | summary | kind |
---|---|---|---|---|
Installation |
2024-10-30 |
2024-11-14 |
Complete guide for installing and configuring Pynions on your local machine. |
detailed |
- Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Python 3.9+ and Git:
brew install python git
#Verify installations
python3 --version # Should show 3.9 or higher
git --version
- Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate
- Install Pynions:
pip install .
The installer will automatically:
- Create
.env
from.env.example
in your project root - Create
pynions.json
frompynions.example.json
in your project root
- Configure your API keys:
# Open .env in your favorite editor
nano .env
# Add your API keys:
OPENAI_API_KEY=your_key_here # Required
SERPER_API_KEY=your_key_here # Optional, for search
ANTHROPIC_API_KEY=your_key_here # Optional, for Claude
JINA_API_KEY=your_key_here # Optional, for embeddings
Common issues:
- Missing API keys
- Check if
.env
exists in your project root - Ensure you've added your OpenAI API key
- Check if
- Configuration issues
- Verify
pynions.json
exists in your project root - Check file permissions
- Verify
- Run test workflow:
# Ensure venv is activated
source venv/bin/activate
# Run example
python examples/serp_analysis.py
- Check output:
- Progress messages should appear
- Results in
data/
directory - No error messages
- Check logs in data/pynions.log
-
Download Cursor:
- Visit https://cursor.sh
- Download Mac version
- Install application
-
Open project:
- Open Cursor
- File -> Open Folder
- Select
~/Documents/pynions
-
Configure Python interpreter:
- Click Python version in status bar
- Select:
~/Documents/pynions/venv/bin/python
# Check Python version
python --version
# If needed, specify Python 3 explicitly
python3 --version
# Deactivate if already in a venv
deactivate
# Remove existing venv if needed
rm -rf venv
# Create new venv
python3 -m venv venv
# Activate
source venv/bin/activate
# Fix venv permissions
chmod +x venv/bin/activate
chmod +x venv/bin/python
# Fix data directory permissions
chmod 755 data
# Verify virtual environment is activated
which python # Should show: ~/Documents/pynions/venv/bin/python
# Verify installation
pip list
# Reinstall dependencies
pip install -r requirements.txt
# Check if environment variables are loaded
python -c "import os; print(os.getenv('SERPER_API_KEY'))"
# Common fixes:
- Check if .env file exists
- Verify API keys are correct
- Remove quotes from API keys
- Ensure .env is in correct location (pynions/config/.env)
# Install browsers
playwright install
# If that fails, try with sudo
sudo playwright install
# Verify installation
playwright --version
- Always work with activated virtual environment
- Create feature branches for new work:
git checkout -b feature-name
- Run tests before committing:
pytest tests/
- Follow git workflow:
git add .
git commit -m "Description of changes"
Remember to:
- Keep config.json in .gitignore
- Check logs in data/pynions.log for issues
- Run tests before committing changes
- Test components in isolation when debugging
Optional but recommended:
- HTTPie for API testing:
brew install httpie
- jq for JSON processing:
brew install jq
- VS Code extensions:
- Python
- Python Environment Manager
To update dependencies:
pip install --upgrade -r requirements.txt
To update Playwright:
playwright install
- Read Configuration for detailed API setup
- Try example workflows in Examples
- Check Plugins for plugin usage
- See Workflows for creating custom workflows
- Review Debugging if you encounter issues