Sympy 简明教程
SymPy - Installation
SymPy 有一个重要的先决条件库,名称为 mpmath 。这个 Python 库用于任意精度的实数和复数浮点运算。但是,在按以下方式安装 SymPy 时,Python 的软件包安装程序 PIP 会自动安装它 -
SymPy has one important prerequisite library named mpmath. It is a Python library for real and complex floating-point arithmetic with arbitrary precision. However, Python’s package installer PIP installs it automatically when SymPy is installed as follows −
pip install sympy
其他 Python 分发包(如 Anaconda、Enthought Canopy 等)可能已将 SymPy 内置其中。要验证,可以在 Python 提示符中键入以下内容 -
Other Python distributions such as Anaconda, Enthought Canopy, etc., may have SymPy already bundled in it. To verify, you can type the following in the Python prompt −
>>> import sympy
>>> sympy.__version__
然后你将获得如下 SymPy 当前版本输出 -
And you get the below output as the current version of sympy −
'1.5.1'
'1.5.1'
可在 https://github.com/sympy/sympy 上获取 SymPy 软件包的源代码。
Source code of SymPy package is available at https://github.com/sympy/sympy.