Install & Compatibility
Where this runs
tested against v4.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.504s · 74MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.6s · import 0.514s · 75MB
73MB installed
● package 73MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
InvenioI18N
✓ from invenio_i18n import InvenioI18N
current_i18n
✓ from invenio_i18n import current_i18n
✗ from flask_babelex import current_i18n
Flask-BabelEx is a dependency but its symbols are re-exported via invenio_i18n
Minimal Flask app with Invenio-I18N initialization and language detection.
from flask import Flask
from invenio_i18n import InvenioI18N
app = Flask(__name__)
app.config['I18N_LANGUAGES'] = [('en', 'English'), ('fr', 'Fran\u00e7ais')]
ext = InvenioI18N(app)
@app.route('/')
def index():
from invenio_i18n import current_i18n
return current_i18n.locale.language
if __name__ == '__main__':
app.run()
Errors
Common errors & fixes
ImportError: cannot import name 'InvenioI18N' from 'invenio_i18n'
Older version of invenio-i18n (pre-1.0) had different import path.
fixUpgrade to latest: pip install --upgrade invenio-i18n
RuntimeError: babel data directory not found
Missing translation files; often due to incomplete pip install or without Flask-BabelEx.
fixEnsure Flask-BabelEx is installed and translation data is packaged: pip install Flask-BabelEx
Upgrade
Version history
4.0.0latest on PyPI · released Jun 17, 2026
Audit
Dependencies
invenio-baserequiredCore dependency for Invenio framework
Flask-BabelExrequiredFlask extension for Babel integration