Complain if Python and NumPy versions are too old for MLlib

This commit is contained in:
Matei Zaharia 2014-01-14 12:27:58 -08:00
parent 938e4a0e16
commit 5b3a3e28d7

View file

@ -18,3 +18,13 @@
""" """
Python bindings for MLlib. Python bindings for MLlib.
""" """
# MLlib currently needs Python 2.7+ and NumPy 1.7+, so complain if lower
import sys
if sys.version_info[0:2] < (2, 7):
raise Exception("MLlib requires Python 2.7+")
import numpy
if numpy.version.version < '1.7':
raise Exception("MLlib requires NumPy 1.7+")