Core Python Dependencies
SwissKnife requires Python 3.13 or higher and several Python packages:Installation with UV (Recommended)
Manual Installation
If you prefer to install dependencies manually:Python Package Overview
Document Processing
Document Processing
- pypandoc - Universal document converter (requires Pandoc)
- python-docx - Microsoft Word document handling
- pdfplumber - PDF text extraction and analysis
- openpyxl - Excel file processing
- pypdf - PDF manipulation for merge/split operations
Media Processing
Media Processing
- Pillow (PIL) - Image processing and conversion
- imageio-ffmpeg - Video and audio conversion backend (includes FFmpeg binary)
- pydub - Audio manipulation and format conversion
- moviepy - Video editing and processing
Archive Handling
Archive Handling
- patoolib - Universal archive extraction and creation
AI Features
AI Features
- google-genai - Google Gemini AI integration for text summarization and analysis
Standard Library (Built-in)
Standard Library (Built-in)
- argparse - Command-line interface parsing
- pathlib - Modern path handling
- tempfile - Temporary file management
- subprocess - External process execution
LaTeX Installation
LaTeX is required for PDF conversion from document formats. If you only work with images, audio, video, or archives, you can skip this section.
- Windows
- Linux
- macOS
MiKTeX (Recommended)
Download MiKTeX
Visit miktex.org and download the installer
TeX Live (Alternative)
If you have Chocolatey package manager installed:Archive Tools
Some archive formats require external command-line tools for extraction and creation.7-Zip (.7z format)
Required for handling 7-Zip archives:
- Linux
- macOS
- Windows
Ubuntu/Debian:This installs the
7z command-line utility with full compression and extraction support.RAR (.rar format)
Required for handling RAR archives:
- Linux
- macOS
- Windows
Ubuntu/Debian:
unrar- For extraction onlyrar- For both creation and extraction
Verifying Installation
After installing dependencies, verify they are correctly configured:Troubleshooting
LaTeX not found during PDF conversion
LaTeX not found during PDF conversion
Error:
FileNotFoundError: [Errno 2] No such file or directory: 'xelatex'Solution:- Ensure LaTeX is installed following the instructions above
- Verify LaTeX is in your PATH by running
pdflatex --version - Restart your terminal after installation
7z or rar command not found
7z or rar command not found
Error:
Archive extraction failed or Command not found: 7zSolution:- Install the appropriate archive tool for your OS
- Verify the tool is in your PATH
- On Windows, ensure you’ve added the installation directory to PATH and restarted your terminal
Module not found errors
Module not found errors
Error:
ModuleNotFoundError: No module named 'pypandoc'Solution:- Ensure you’ve activated the virtual environment:
source .venv/bin/activate - Re-run
uv syncor manually install missing packages - Verify you’re using the correct Python interpreter
FFmpeg errors during media conversion
FFmpeg errors during media conversion
Error:
FFmpeg not found or media conversion failsSolution:- The
imageio-ffmpegpackage includes FFmpeg binary automatically - Reinstall:
uv add imageio-ffmpeg --force - Verify installation:
python -c "import imageio_ffmpeg; print(imageio_ffmpeg.get_ffmpeg_exe())"