def env_is_created(env_name):
 from conda import misc
 from os.path import basename
 for prefix in misc.list_prefixes():
  name = (ROOT_ENV_NAME if (prefix == context.root_dir) else basename(prefix))
  if (name == env_name):
   return True
 return False

def env_is_created ( env_name ) : from conda import misc from os . path import basename for prefix in misc . list_prefixes ( ) : name = ( ROOT_ENV_NAME if ( prefix == context . root_dir ) else basename ( prefix ) ) if ( name == env_name ) : return True return False
assert an environment is created args: env_name: the environment name returns: true if created false otherwise .