Python 如何检查scipy的版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21385196/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 22:43:55  来源:igfitidea点击:

How to check the version of scipy

pythonscipy

提问by OD IUM

How can I check the version of scipyinstalled on my system?

如何检查scipy系统上安装的版本?

采纳答案by zhangxaochen

In [95]: import scipy

In [96]: scipy.__version__
Out[96]: '0.12.0'

In [104]: scipy.version.*version?
scipy.version.full_version
scipy.version.short_version
scipy.version.version

In [105]: scipy.version.full_version
Out[105]: '0.12.0'

In [106]: scipy.version.git_revision
Out[106]: 'cdd6b32233bbecc3e8cbc82531905b74f3ea66eb'

In [107]: scipy.version.release
Out[107]: True

In [108]: scipy.version.short_version
Out[108]: '0.12.0'

In [109]: scipy.version.version
Out[109]: '0.12.0'

See SciPy doveloper documentationfor reference.

请参阅SciPy doveloper 文档以供参考。

回答by ngakak

on command line

在命令行上

 example$:python
 >>> import scipy
 >>> scipy.__version__
 '0.9.0'

回答by Maksood

Using command line:

使用命令行:

python -c "import scipy; print(scipy.__version__)"

回答by Dinusha Dilanka

From the python command prompt:

从 python 命令提示符:

import scipy
print scipy.__version__

In python 3 you'll need to change it to:

在python 3中,您需要将其更改为:

print (scipy.__version__)