Environment:Neuml Txtai Python Core Dependencies
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, NLP, Semantic_Search |
| Last Updated | 2026-02-10 00:00 GMT |
Overview
Python 3.10+ environment with PyTorch >= 2.4, Transformers >= 4.56.2, and Faiss for approximate nearest neighbor search.
Description
This environment defines the core required dependencies for running txtai. It provides the foundation for semantic search, LLM orchestration, and language model workflows. The core stack includes PyTorch for tensor operations and model inference, Hugging Face Transformers for model loading, Faiss for vector similarity search, and supporting libraries for serialization and configuration.
Usage
This environment is always required for any txtai usage. Every workflow, pipeline, and embedding operation depends on these core dependencies. Install with `pip install txtai` to get the base environment.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux, macOS, or Windows | All platforms supported |
| Python | >= 3.10 | Strict minimum, defined in `setup.py` |
| Disk | ~2GB minimum | For PyTorch and model downloads |
Dependencies
System Packages
- No system packages required for base installation
- `libportaudio2` required on Linux for audio pipelines (optional)
- `libsndfile1` required on Linux for transcription (optional)
Python Packages (Required)
- `torch` >= 2.4
- `transformers` >= 4.56.2
- `faiss-cpu` >= 1.7.1.post2
- `huggingface-hub` >= 0.34.0
- `numpy` >= 1.18.4
- `msgpack` >= 1.0.7
- `pyyaml` >= 5.3
- `regex` >= 2022.8.17
- `safetensors` >= 0.4.5
Credentials
No credentials required for the base environment. API keys for remote services (HuggingFace Hub, LiteLLM, cloud storage) are only needed when using optional extras.
Quick Install
# Base installation
pip install txtai
# CPU-only installation (smaller footprint, no GPU support)
pip install txtai torch==2.4.0+cpu -f https://download.pytorch.org/whl/torch
# Full installation with all extras
pip install txtai[all]
Code Evidence
Python version requirement from `setup.py:158`:
python_requires=">=3.10"
Core dependencies from `setup.py:9-12`:
install = ["faiss-cpu>=1.7.1.post2", "msgpack>=1.0.7", "torch>=2.4", "transformers>=4.56.2"]
install += ["huggingface-hub>=0.34.0", "numpy>=1.18.4", "pyyaml>=5.3", "regex>=2022.8.17", "safetensors>=0.4.5"]
Version tracking in index metadata from `ann/base.py:149`:
"txtai": __version__
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `sqlite3.OperationalError: json_extract` | Python compiled without JSON1 extension | Upgrade Python to 3.10+ or use conda |
| `METADATA exceptions` on Google Colab | Stale package metadata after pip upgrade | Restart the Colab kernel |
| `error installing ... square brackets` | Shell interprets `[` in `txtai[pipeline]` | Escape with quotes: `pip install 'txtai[pipeline]'` |
Compatibility Notes
- Linux: Fully supported. Recommended platform for production deployment.
- macOS: Supported with caveats. May need `libomp` for older Faiss versions (`brew install libomp`). See macOS stability workarounds heuristic.
- Windows: Supported. C++ Build Tools may be required for compiling some optional dependencies. PowerShell requires quoting extras: `pip install 'txtai[pipeline]'`.
- Docker: Official images available. CPU image uses `python:3.10-slim` base.