def locate_prefix_by_name(ctx, name):
 if (name == ROOT_ENV_NAME):
  return ctx.root_dir
 for envs_dir in chain((ctx.envs_dirs + (os.getcwd(),))):
  prefix = join(envs_dir, name)
  if isdir(prefix):
   return prefix
 raise CondaEnvironmentNotFoundError(name)

def locate_prefix_by_name ( ctx , name ) : if ( name == ROOT_ENV_NAME ) : return ctx . root_dir for envs_dir in chain ( ( ctx . envs_dirs + ( os . getcwd ( ) , ) ) ) : prefix = join ( envs_dir , name ) if isdir ( prefix ) : return prefix raise CondaEnvironmentNotFoundError ( name )
find the location of a prefix given a conda env name .