def check_qt():
 qt_infos = dict(pyqt5=('PyQt5', '5.2'), pyqt=('PyQt4', '4.6'))
 try:
  import qtpy
  (package_name, required_ver) = qt_infos[qtpy.API]
  actual_ver = qtpy.PYQT_VERSION
  if (LooseVersion(actual_ver) < LooseVersion(required_ver)):
   show_warning(('Please check Spyder installation requirements:\n%s %s+ is required (found v%s).' % (package_name, required_ver, actual_ver)))
 except ImportError:
  show_warning(('Failed to import qtpy.\nPlease check Spyder installation requirements:\n\nqtpy 1.1.0+ and either\n%s %s+ or\n%s %s+\n\nare required to run Spyder.' % (qt_infos['pyqt5'] + qt_infos['pyqt'])))

def check_qt ( ) : qt_infos = dict ( pyqt5 = ( 'PyQt5' , '5.2' ) , pyqt = ( 'PyQt4' , '4.6' ) ) try : import qtpy ( package_name , required_ver ) = qt_infos [ qtpy . API ] actual_ver = qtpy . PYQT_VERSION if ( LooseVersion ( actual_ver ) < LooseVersion ( required_ver ) ) : show_warning ( ( 'Please check Spyder installation requirements:\n%s %s+ is required (found v%s).' % ( package_name , required_ver , actual_ver ) ) ) except ImportError : show_warning ( ( 'Failed to import qtpy.\nPlease check Spyder installation requirements:\n\nqtpy 1.1.0+ and either\n%s %s+ or\n%s %s+\n\nare required to run Spyder.' % ( qt_infos [ 'pyqt5' ] + qt_infos [ 'pyqt' ] ) ) )
check qt binding requirements .