latex2sympy2-extended
Convert LaTeX math to SymPy expressions
Decision gist · record as of 2026-08-14
Yes, if you need to parse LaTeX math into SymPy. The package has low install friction, permissive licensing, no known vulnerabilities, and solid popularity (top 5000). The aging maintenance status (216 days since last release) is a minor concern for a parser—grammar-based tools are relatively stable—but verify that the ANTLR runtime version you choose aligns with your environment. Suitable for production use in math-heavy applications.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with only two runtime dependencies (sympy and antlr4-python3-runtime).
- Package is aging—last release was 216 days ago—so expect slower response to issues, though no active maintenance problems are evident.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions.
last release 2026-01-10 (216 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,417,128 downloads/mo, #2,628 on PyPI
Alternatives
Verify before relying
pip install latex2sympy2-extended
from latex2sympy2_extended import latex2sympy
tex = r"\frac{d}{dx}(x^{2}+x)"
result = latex2sympy(tex)
# => "Derivative(x**2 + x, x)"- Whether determinant, transpose, and elementary transformation calculations are truly irreversible in all use cases or only under specific conditions.
- Performance characteristics with large or deeply nested LaTeX expressions.
- Completeness of support for less common LaTeX math environments beyond those documented in examples.
What it is and what it does
latex2sympy2_extended is a LaTeX-to-SymPy parser that reads mathematical notation in LaTeX format and produces equivalent SymPy symbolic expressions. It uses ANTLR 4.13.1 to generate its parser and handles a broad range of mathematical constructs: basic arithmetic and functions, calculus operations like derivatives and integrals, linear algebra including matrices and determinants, and set operations. The package is adapted from an earlier latex2sympy project and supports multiple ANTLR runtime versions.
The typical workflow is to pass a LaTeX string to the main `latex2sympy()` function, which returns a SymPy expression you can then manipulate, evaluate, or further process in Python. It handles subscripts, Greek letters, common mathematical functions, and complex expressions with nested operations. One important caveat: operations on determinants, transposed matrices, and elementary row/column transformations perform actual symbolic computation and are not reversible—the result is simplified rather than left as a structural representation.
Use it for
- Convert handwritten or scanned LaTeX math formulas into SymPy for symbolic computation and manipulation.
- Parse mathematical expressions from documents or user input to enable programmatic solving and evaluation.
- Automate derivation and integration workflows by converting LaTeX calculus notation to SymPy Derivative and Integral objects.
- Transform matrix notation from LaTeX into SymPy Matrix objects for linear algebra operations.
- Build educational tools or math tutoring systems that accept LaTeX input and perform symbolic analysis.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to parse LaTeX math into SymPy.
The package has low install friction, permissive licensing, no known vulnerabilities, and solid popularity (top 5000). The aging maintenance status (216 days since last release) is a minor concern for a parser—grammar-based tools are relatively stable—but verify that the ANTLR runtime version you choose aligns with your environment. Suitable for production use in math-heavy applications.
Install
latex2sympy2-extended on PyPI
Before you install
Low install friction with only two runtime dependencies (sympy and antlr4-python3-runtime). Package is aging—last release was 216 days ago—so expect slower response to issues, though no active maintenance problems are evident.
Requires Python 3.10 or later.
License in practice
MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install latex2sympy2-extended
from latex2sympy2_extended import latex2sympy
tex = r"\frac{d}{dx}(x^{2}+x)"
result = latex2sympy(tex)
# => "Derivative(x**2 + x, x)"
Verify before relying
- Whether determinant, transpose, and elementary transformation calculations are truly irreversible in all use cases or only under specific conditions.
- Performance characteristics with large or deeply nested LaTeX expressions.
- Completeness of support for less common LaTeX math environments beyond those documented in examples.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagessympyantlr4-python3-runtime |
| Maintenance | Aging 216 days since the last release |
| First released | |
| Downloads | 3,417,128 / month, #2,628 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: latex2sympy2_extended-1.11.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “latex to sympy conversion”
- latex2sympy2-extendedParses LaTeX math expressions and converts them to SymPy symbolic…
- latex2sympy2Parses LaTeX math expressions and converts them to SymPy symbolic…
- sympySymPy is a Python library for symbolic mathematics, performing…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also latex2sympy2 · math-verify · py-asciimath · sphinx-math-dollar · pylatexenc · sphinxcontrib-katex · pysr · latex2mathml · py-expression-eval