Skip to main content

SymEngine Python Wrappers

Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library.

Build Status
Build status

Installation

Pip

See License section for information about wheels

pip install symengine --user

Conda package manager

conda install python-symengine -c conda-forge

Build from source

Install prerequisites.

CMake       >= 3.21
Python3     >= 3.11
SymEngine   >= 0.15.0
pip
setuptools_scm           # will be automatically downloaded by pip
scikit-build-core        # will be automatically downloaded by pip
cython      >= 0.29.24   # will be automatically downloaded by pip
cython-cmake             # will be automatically downloaded by pip

For SymEngine, only a specific commit/tag (see symengine_version.txt) is supported. The latest git master branch may not work as there may be breaking changes in SymEngine.

Python wrappers can be installed by,

pip install . -vv

If you are building SymEngine for development, you should implement the dependencies automatically installed by pip and do,

pip install -e . -vv --no-build-isolation

A few additional options to scikit-build-core are mentioned here:

pip install -e . -vv --no-build-isolation
    -Ccmake.build-type=Release|Debug                                # Set build-type for multi-configuration generators like MSVC
    -Ccmake.define.SymEngine_DIR=/path/to/symengine/install/dir     # Path to SymEngine install directory or build directory

Notes on Dependencies

If you intend to evaluate floating-point expressions (using lambdify), you should consider linking against LLVM. Many users might also benefit from linking against FLINT, as it is now LGPL-licensed.

In general, sudo is only required if you are installing to the default prefix (/usr/local). We recommend specifying a custom prefix (--prefix=$HOME/.local) to avoid requiring administrative privileges, which most users can do without using sudo.

If you're uncomfortable specifying the prefix manually, we suggest using Conda or installing the pre-built wheels via pip instead of building from source.

Verification

You can verify the installation of SymEngine by using the provided code snippet in this README. This snippet ensures that the installation works as expected and that basic functionality is available.

from symengine import var
x, y, z = var('x y z')
e = (x + y + z)**2
expanded_e = e.expand()
print(expanded_e)

This will output:

x**2 + y**2 + z**2 + 2*x*y + 2*x*z + 2*y*z

Note: The verification code provided above checks the functionality of SymEngine. For additional verification specific to SymEngine, please refer to the official SymEngine Python bindings repository for further tests and examples.

License

symengine.py is MIT licensed and uses several LGPL, BSD-3, and MIT licensed libraries.

Licenses for the dependencies of pip wheels are as follows:

  • pip wheels on Unix use GMP (LGPL-3.0-or-later), MPFR (LGPL-3.0-or-later), MPC (LGPL-3.0-or-later), LLVM (Apache-2.0), zlib (Zlib), libxml2 (MIT), zstd (BSD-3-Clause), and symengine (MIT AND BSD-3-Clause).
  • pip wheels on Windows use MPIR (LGPL-3.0-or-later) instead of GMP above and pthreads-win32 (LGPL-3.0-or-later) additionally.
  • NumPy (BSD-3-Clause) and SymPy (BSD-3-Clause) are optional dependencies.
  • Sources for these binary dependencies can be found on symengine-wheels.

Metadata

Release files for symengine 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for symengine 0.15.0
File Size Uploaded Provenance Actions
symengine-0.15.0.tar.gz 107.4 kB Without provenance Details for symengine-0.15.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for symengine 0.15.0
File Actions
symengine-0.15.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for symengine-0.15.0-cp314-cp314t-win_amd64.whl
symengine-0.15.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Details for symengine-0.15.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
symengine-0.15.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ PowerPC 64-le Details for symengine-0.15.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl
symengine-0.15.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 Details for symengine-0.15.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
symengine-0.15.0-cp314-cp314t-macosx_11_0_x86_64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ x86-64 Details for symengine-0.15.0-cp314-cp314t-macosx_11_0_x86_64.whl
symengine-0.15.0-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details for symengine-0.15.0-cp314-cp314t-macosx_11_0_arm64.whl
symengine-0.15.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for symengine-0.15.0-cp311-abi3-win_amd64.whl
symengine-0.15.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for symengine-0.15.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
symengine-0.15.0-cp311-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl CPython 3.11 abi3 Linux glibc 2.17+ PowerPC 64-le Details for symengine-0.15.0-cp311-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl
symengine-0.15.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for symengine-0.15.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
symengine-0.15.0-cp311-abi3-macosx_11_0_x86_64.whl CPython 3.11 abi3 macOS 11.0+ x86-64 Details for symengine-0.15.0-cp311-abi3-macosx_11_0_x86_64.whl
symengine-0.15.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for symengine-0.15.0-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 472.6 MB

Release files / symengine-0.15.0.tar.gz

Download URL symengine-0.15.0.tar.gz
Size 107.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7f1f911c771e771bf0d73873c6bedb4af48148ffc887da2717b58aa846efca97
BLAKE2b-256 checksum
How to use checksums
76f2985d8b2e322e3dbe0a957a8d3f17c663390ac57dcc8cb956fac0968ce6f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp314-cp314t-win_amd64.whl

Download URL symengine-0.15.0-cp314-cp314t-win_amd64.whl
Size 19.2 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
4c1a4d73b7b95d96a479ed7434aa93608b1ca549689ea0796d7458f27b0f6c1f
BLAKE2b-256 checksum
How to use checksums
4b5df1495a8afa09a1eaff9e16bb29901414f618b66a90d9b7a8e92eee742b72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL symengine-0.15.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 49.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
2de64071c5ba42a7e2c20ff9d860e4f37628efad52acad2017b36b69c5d66b3b
BLAKE2b-256 checksum
How to use checksums
dd70ceb37052e8e8ebbe23f1c8022e06a47e52c053468ae1be4375044a9da113
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl

Download URL symengine-0.15.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl
Size 60.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ PowerPC 64-le
SHA-256 checksum
How to use checksums
b496b2a2100dc0f7c97e2b8c62e9842d986b830f553526c86959ced38facc5f4
BLAKE2b-256 checksum
How to use checksums
762129ccd0040b5e231ef3e664db1dfbfe9447e496d702537daea812b42b799d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL symengine-0.15.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 58.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
38bcfc2da15c89d757ada06b65a9a40037adb453040f8ba29150ae6b386d45d1
BLAKE2b-256 checksum
How to use checksums
2d8d430c7192f137299eb11920610802eb31c2d9823b7c7f3a001e90814fa5d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp314-cp314t-macosx_11_0_x86_64.whl

Download URL symengine-0.15.0-cp314-cp314t-macosx_11_0_x86_64.whl
Size 26.1 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
2ef1accc404173fb0082b26af36d32ca41e037bb10d377afe1de22254aa4610f
BLAKE2b-256 checksum
How to use checksums
da2964546f10de07a3d50b8ef78e5ed775b4793588e25727bbc895a9762a9ff4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp314-cp314t-macosx_11_0_arm64.whl

Download URL symengine-0.15.0-cp314-cp314t-macosx_11_0_arm64.whl
Size 22.9 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9c331eeeca60ec9fae37057f5c21d2f930884441cdbce315ddb1db32882a6a5d
BLAKE2b-256 checksum
How to use checksums
67d8a73e3e598a6ec6a37365059ba9bfca4bc0bcd17c9d148100bf127c3016bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp311-abi3-win_amd64.whl

Download URL symengine-0.15.0-cp311-abi3-win_amd64.whl
Size 19.1 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
80a565ed0638c1bfcdbba42be87851b21a705df8b504bd09694b0afebccdb6cb
BLAKE2b-256 checksum
How to use checksums
dd3b44906c009f401764e40315e95dc8835ded17904160521921602a9a15aa66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL symengine-0.15.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 48.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
30639ad83ec20f5d0d2b514b1150729f8d19f4d685dd187a3e6ec8b67fc89120
BLAKE2b-256 checksum
How to use checksums
bc7ce74352a9a33a9bc2fb4387a6a09969c3a35735f84e69a7627dedaa80d682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp311-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl

Download URL symengine-0.15.0-cp311-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl
Size 60.7 MB
Tags CPython 3.11 Linux glibc 2.17+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
790fcbbc13a18863c2a7f3107b6b1d5faaddb4058801327fcac42b41cb19ea6d
BLAKE2b-256 checksum
How to use checksums
b83c9aae81a0df8ae99cab0fec88f84c2c106c6bb3cb9265e647a3ae08bcaa0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL symengine-0.15.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 58.5 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
18eb3b82791e0f4b98789fe2512f0217487036233f62430796acc76bae118218
BLAKE2b-256 checksum
How to use checksums
95cda96d946de579e5f8c649e8cb4dd016fb0fc732f7bdf6251d794ec5341caa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp311-abi3-macosx_11_0_x86_64.whl

Download URL symengine-0.15.0-cp311-abi3-macosx_11_0_x86_64.whl
Size 26.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
cd9f38f011610ffe72c7e4fa0b0a8e441e91d46030cd7fbd0ccbfa5c714082e9
BLAKE2b-256 checksum
How to use checksums
5ac3b5742656285bb6d9203a27098e5a5f9200be140d5dc0c56ce2083e7f8eaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / symengine-0.15.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL symengine-0.15.0-cp311-abi3-macosx_11_0_arm64.whl
Size 22.8 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
452d1ed85b9f3fbe3c2b5c29bce7d2d2f61437b69ed50765db322b5d5afe191f
BLAKE2b-256 checksum
How to use checksums
596f90230e26decc7cc8e11cea93ae45430b7a5539c50877ff270fa1b38d017e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for symengine 0.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page