argostranslate
Open-source neural machine translation library based on OpenNMT's CTranslate2
What it is and what it does
Argos Translate is a Python library for offline neural machine translation built on OpenNMT's CTranslate2. It lets you translate text between language pairs by downloading pre-trained model packages and running them locally without external API calls. The library can automatically chain translations through intermediate languages when a direct model isn't available—for example, translating Spanish to French by routing through English if you have es→en and en→fr models installed.
You interact with it through Python code, a command-line interface, or by building on top of it (LibreTranslate is an example web service built on Argos Translate). The package handles model discovery, installation, and management. It supports GPU acceleration via CTranslate2 when configured with the ARGOS_DEVICE_TYPE environment variable, and depends on several NLP libraries (spacy, stanza, sacremoses, sentencepiece, minisbd) for preprocessing and tokenization.
Use it for:
- Translate user-generated content in a web or desktop application without sending data to a third-party translation API
- Build a command-line tool that translates documents or text snippets locally on demand
- Integrate translation into a data processing pipeline where you need to preserve privacy or avoid API rate limits
- Experiment with neural machine translation models and language pivoting strategies for research or prototyping
- Deploy a translation service on edge devices or servers where external API access is unavailable or undesirable
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Argos Translate is an open-source offline neural machine translation library that translates text between many language pairs using OpenNMT's CTranslate2 backend, with support for automatic language pivoting when direct translations are unavailable.
Yes, if you need offline neural translation and can manage model downloads. The library is actively maintained, permissively licensed, and has low install friction. Main considerations: you must download language models before translating (not included in the package), and the seven NLP dependencies add complexity. No known security vulnerabilities. Best suited for applications requiring privacy, offline operation, or avoiding API dependencies; less ideal if you need quick setup with minimal configuration.
Install
argostranslate on PyPI
pip
pip install argostranslateuv
uv add argostranslatepoetry
poetry add argostranslateInstalling argostranslate
Before you install
Low install friction with a pure Python wheel distribution. Actively maintained with recent commits and stable production status. Seven runtime dependencies (ctranslate2, spacy, stanza, sacremoses, sentencepiece, minisbd, packaging) are well-established NLP libraries, though the full translation pipeline adds moderate complexity.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute the package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install argostranslate
import argostranslate.package
import argostranslate.translate
argostranslate.package.update_package_index()
available_packages = argostranslate.package.get_available_packages()
package_to_install = next(
filter(
lambda x: x.from_code == "en" and x.to_code == "es",
available_packages
)
)
argostranslate.package.install_from_path(package_to_install.download())
translatedText = argostranslate.translate.translate("Hello World", "en", "es")
print(translatedText)
Requires downloading and installing language model packages (.argosmodel files) before translation; GPU acceleration requires setting ARGOS_DEVICE_TYPE environment variable and CTranslate2 GPU support.
Verify before relying
- Whether language model downloads are cached locally or re-downloaded on each use
- Typical latency and throughput for translation operations on CPU vs GPU
- Memory footprint when multiple language models are installed simultaneously
- Quality degradation when pivoting through intermediate languages vs direct translation
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — ctranslate2, minisbd, packaging, sacremoses, sentencepiece, spacy, stanza |
| Maintenance | actively maintained — 193 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 300,419/month — #7,842 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: argostranslate-1.11.0-py3-none-any.whl
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
translatorsTranslators provides a unified Python interface…
copyleft · top 15,000 on PyPI
deep-translatorTranslates text between languages using…
permissive · top 5,000 on PyPI
translateTranslate text between languages via command…
permissive · top 15,000 on PyPI
ctranslate2CTranslate2 is a C++ and Python library that…
permissive · top 5,000 on PyPI
azure-ai-translation-textProvides a Python client for Azure's neural…
unclear · top 15,000 on PyPI
libretranslatepyPython client library for the LibreTranslate…
permissive · top 15,000 on PyPI
googletransGoogletrans translates text and detects…
permissive · top 5,000 on PyPI
googletrans-pyProvides free Google Translate API access for…
permissive · top 15,000 on PyPI
azure-ai-translation-documentTranslates documents stored in Azure Blob…
permissive · top 15,000 on PyPI
google-cloud-translatePython client library for Google Cloud…
permissive · top 1,000 on PyPI