From 0b93c18230792c5dafac2ba9fefd0c3b2522927f Mon Sep 17 00:00:00 2001 From: arturgontijo Date: Tue, 11 Jun 2019 16:02:45 -0300 Subject: [PATCH] Fix checking Ubuntu version. --- bindings/python/cntk/cntk_py_init.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/python/cntk/cntk_py_init.py b/bindings/python/cntk/cntk_py_init.py index 6fb1fb27c14d..02fb29b4f240 100644 --- a/bindings/python/cntk/cntk_py_init.py +++ b/bindings/python/cntk/cntk_py_init.py @@ -51,8 +51,9 @@ def cntk_check_distro_info(): # warn the user CNTK may not work out of the box __my_distro__ = __my_distro__.lower() __my_distro_ver__ = __my_distro_ver__.lower() + __my_distro_ver_yy__ = __my_distro_ver__.split('.')[0] if __my_distro__ == 'ubuntu' else 0 - if __my_distro__ != 'ubuntu' or __my_distro_ver__ != '16.04': + if __my_distro__ != 'ubuntu' or int(__my_distro_ver_yy__) < 16: warnings.warn('Unsupported Linux distribution (%s-%s). CNTK supports Ubuntu 16.04 and above, only.' % (__my_distro__, __my_distro_ver__)) else: warnings.warn('Unsupported platform (%s). CNTK supports Linux and Windows platforms, only.' % __my_system__)