import sys
import matplotlib
print ("Python is :",sys.version)
print ("matplotlib is :",matplotlib.__version__)
运行结果:
Python is : 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 2 2016, 17:53:06) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] matplotlib is : 1.5.1