class_docstr: Runtime Environment Manager class to manage runtime environment.
class_docstr_tok: ["Runtime","Environment","Manager","class","to","manage","runtime","environment","."]
docstr: Generates dependencies list from the user's local runtime.
  
  Raises RuntimeEnvironmentError if not able to.
  
  Currently supports: conda environments
code: def _capture_from_local_runtime(self) -> str:
      """Generates dependencies list from the user's local runtime.
  
      Raises RuntimeEnvironmentError if not able to.
  
      Currently supports: conda environments
      """
  
      # Try to capture dependencies from the conda environment, if any.
      conda_env_name = self._get_active_conda_env_name()
      conda_env_prefix = self._get_active_conda_env_prefix()
      if conda_env_name:
          logger.info("Found conda_env_name: '%s'", conda_env_name)
      elif conda_env_prefix:
          logger.info("Found conda_env_prefix: '%s'", conda_env_prefix)
      else:
          raise ValueError("No conda environment seems to be active.")
  
      if conda_env_name == "base":
          logger.warning(
              "We recommend using an environment other than base to "
              "isolate your project dependencies from conda dependencies"
          )
  
      local_dependencies_path = os.path.join(
          os.getcwd(), "env_snapshot.yml"
      )
      self._export_conda_env_from_prefix(
          conda_env_prefix, local_dependencies_path
      )
  
      return local_dependencies_path
  
imports: from __future__ import absolute_import
  import logging
  import sys
  import shlex
  import os
  import subprocess
  import time
  import dataclasses
  import json
label_desc: Use image node_id 2 for calling the RuntimeEnvironmentManager obj's underlying member method code with example usage: obj._capture_from_local_runtime() and returns: local_dependencies_path