- if LooseVersion(wx.__version__) < LooseVersion('3.0'):
- wx.MessageBox(_("This version of Cura requires WxPython version 3.0 or newer.\nYour current WxPython version is %s.") % wx.__version__,
- _("WxPython version is too old"), wx.OK | wx.ICON_ERROR)
- return
+ try:
+ from distutils.version import LooseVersion
+
+ if LooseVersion(wx.__version__) < LooseVersion('3.0'):
+ wx.MessageBox(_("This version of Cura requires WxPython version 3.0 or newer.\nYour current WxPython version is %s.") % wx.__version__,
+ _("WxPython version is too old"), wx.OK | wx.ICON_ERROR)
+ return
+ except:
+ # distutils not found.. it can happen!
+ # Only check the first 3 characters of the version string instead
+ if float(wx.__version__[0:3]) < 3.0:
+ wx.MessageBox(_("This version of Cura requires WxPython version 3.0 or newer.\nYour current WxPython version is %s.") % wx.__version__,
+ _("WxPython version is too old"), wx.OK | wx.ICON_ERROR)
+ return