Python library providing wrappers to SymEngine
Maintained. Last release 4 weeks ago, commits in 10 of the last 26 weeks. Weaker on release cadence and security practices.
pip install symengineSymEngine Python Wrappers
Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library.
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.