--- id: symengine version: "0.14.1" license: MIT license_treatment: permissive maintenance: active --- # symengine — Python library providing wrappers to SymEngine License: permissive · Maintenance: active · Downloads: 506.4K/mo ## What it is and what it does SymEngine is a Python wrapper around a fast C++ symbolic algebra engine. It provides core symbolic computation capabilities—variable definition, expression expansion, simplification, and algebraic manipulation—without requiring a full computer algebra system. The library is designed for speed and is used where symbolic operations need to be integrated into Python workflows without the overhead of heavier systems. The package ships pre-built wheels for Python 3.9–3.13 across macOS, Linux, and Windows, reducing install friction for most users. Building from source is possible but requires CMake, the SymEngine C++ library itself, and Cython. Optional dependencies like NumPy and SymPy can enhance functionality. The wrapper is actively maintained and carries no known security vulnerabilities. Use it for: - Expand and simplify algebraic expressions symbolically in mathematical or physics simulations. - Integrate symbolic computation into performance-critical Python code where speed matters. - Define symbolic variables and perform algebraic operations in numerical computing pipelines. - Evaluate floating-point expressions via lambdify when linked against LLVM. - Use as a faster alternative to SymPy for core symbolic manipulation tasks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python wrappers for SymEngine, a fast C++ symbolic manipulation library, enabling symbolic computation and algebraic operations in Python. Yes, if you need fast symbolic computation in Python and can accept medium install friction. Pre-built wheels make installation straightforward for Python 3.9–3.13 on common platforms. The MIT license and active maintenance are favorable. No security vulnerabilities are known. Consider it especially if performance of symbolic operations is a bottleneck; otherwise, SymPy may be simpler if speed is not critical. ## Install pip install symengine uv add symengine poetry add symengine ## Installing symengine Before you install: Medium install friction due to compiled C++ dependencies. Pre-built wheels are available for Python 3.9–3.13 on macOS, Linux (x86_64, aarch64, ppc64le), and Windows. Building from source requires CMake ≥ 3.21, SymEngine ≥ 0.14.0, and Cython ≥ 0.29.24. Package is actively maintained with recent commits. License in practice: MIT-licensed wrapper using LGPL-3.0-or-later (GMP, MPFR, MPC, MPIR), Apache-2.0 (LLVM), BSD-3-Clause (zstd, symengine), and Zlib dependencies in wheels. Permissive overall, but LGPL dependencies require awareness of linking obligations if redistributing binaries. Quickstart: pip install symengine from symengine import var x, y, z = var('x y z') e = (x + y + z)**2 expanded_e = e.expand() print(expanded_e) Requires Python ≥ 3.9 and < 4. Pre-built wheels available for common platforms; building from source requires CMake ≥ 3.21 and SymEngine ≥ 0.14.0. Verify before relying: - Whether LLVM linking is recommended or required for typical lambdify use cases. - Performance comparison with SymPy or other symbolic libraries for common operations. - Whether FLINT linking is available in pre-built wheels or requires source build. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 506.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags symbolic math library, symbolic computation python, fast symbolic algebra, C++ symbolic engine, algebraic expression manipulation, symbolic differentiation integration, computer algebra system, symbolic-algebra, compiled-extension, computer-algebra [View on SkillFed](https://skillfed.io/packages/symengine) · [View on PyPI](https://pypi.org/project/symengine/)