SciPy 安装
。
升级 pip:
python3 -m pip install -U pip
安装 scipy 库:
python3 -m pip install -U scipy
安装完成后,我们就可以通过 from scipy import module 来导入 scipy 的库:
constants 是 scipy 的常量模块。
from
scipy
import
constants
以下实例,我们通过导入 scipy 库,然后查看 scipy 库的版本号:
实例
import
scipy
print ( scipy.__version__ )
print ( scipy.__version__ )
执行以上代码,输出结果如下:
1.7.0
以下实例,我们通过导入 scipy 的常量模块 constants 来查看一英亩等于多少平方米:
实例
from
scipy
import
constants
# 一英亩等于多少平方米
print ( constants. acre )
# 一英亩等于多少平方米
print ( constants. acre )
执行以上代码,输出结果如下:
4046.8564223999992