2014年12月30日

numpyとかscipyとかのバージョンの表示方法

numpy

import numpy as np
np.version.full_version
  #=> '1.8.1'

scipy

import scipy as sp
sp.version.full_version
  #=> '0.14.0'

scikit-laern

import sklearn
sklearn.__version__
  #=> '0.15.2'

pandas

import pandas as pd
pd.version.version
  #=> '0.15.2'

# python本体とか依存ライブラリのversionもまとめて出す
pd.show_versions()
  #=> NSTALLED VERSIONS
  #=> ------------------
  #=> commit: None
  #=> python: 2.7.6.final.0
  #=> python-bits: 64
  #=> OS: Linux
  <省略>
  #=> pandas: 0.15.2
  #=> nose: 1.3.4
  #=> Cython: None
  #=> numpy: 1.9.1
  #=> scipy: 0.14.0
  <省略>

2015/01/20追記

matplotlib

matplotlib.__version__
  #=> '1.3.1'