Pages

Friday 15 February 2019

How to find out versions of Machine Learning Libraries in Python?

Lets try to find out versions of some commonly used Python libraries for Machine Learning. Following Python code written in Jupyter notebook finds out the versions of Python, Pandas, Numpy, Sklearn and XGBoost libraries. Similarly you can find out versions of other libraries.

You can also download my Jupyter notebook for following Python code.

import sys
import pandas
import numpy
import sklearn
import xgboost

print('Python Version:', sys.version) print('Pandas Version:', pandas.__version__) print('Numpy Version:', numpy.version.version) print('Scikit-Learn Version:', sklearn.__version__) print('XGBoost Version:', xgboost.__version__)

Press Ctrl + Enter. 
You should get following result:

Python Version: 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)]
Pandas Version: 0.23.4
Numpy Version: 1.15.4
Scikit-Learn Version: 0.20.1
XGBoost Version: 0.81

Note: If you get ModuleNotFoundError error for XGBoost library, try running following code to install XGBoost through code. 

import sys
!{sys.executable} -m pip install xgboost

No comments:

Post a Comment

About the Author

I have more than 10 years of experience in IT industry. Linkedin Profile

I am currently messing up with neural networks in deep learning. I am learning Python, TensorFlow and Keras.

Author: I am an author of a book on deep learning.

Quiz: I run an online quiz on machine learning and deep learning.