def has_python_3():
 if ('win' in sys.platform):
  py_bin = 'py.exe'
 else:
  py_bin = 'python3'
 for path in os.environ['PATH'].split(os.pathsep):
  if os.access(os.path.join(path, py_bin), os.X_OK):
   return True
 return False

def has_python_3 ( ) : if ( 'win' in sys . platform ) : py_bin = 'py.exe' else : py_bin = 'python3' for path in os . environ [ 'PATH' ] . split ( os . pathsep ) : if os . access ( os . path . join ( path , py_bin ) , os . X_OK ) : return True return False
check if python 3 is available .