代码:

import sys, matplotlib, sklearn, IPython
import numpy as np, pandas as pd, scipy as sp

modules = {\'NumPy\': np, \'pandas\': pd, \'scikit-learn\': sklearn,
           \'scipy\': sp, \'matplotlib\': matplotlib, \'IPython\': IPython}

print(\'Python version: %s\' % (sys.version))
for i in modules.items():
    print(\'{} version: {}\'.format(i[0], i[1].__version__))

输出:

 

版权声明:本文为shanger原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/shanger/p/12180729.html