diff --git a/src/accelerate/commands/launch.py b/src/accelerate/commands/launch.py
index fa7588b0a..29e1b7bad 100644
--- a/src/accelerate/commands/launch.py
+++ b/src/accelerate/commands/launch.py
@@ -573,7 +573,7 @@ def multi_gpu_launcher(args):
         try:
             distrib_run.run(args)
         except:
-            if debug:
+            if is_rich_available() and debug:
                 console = get_console()
                 console.print("\n[bold red]Using --debug, `torch.distributed` Stack Trace:[/bold red]")
                 console.print_exception(suppress=[__file__], show_locals=False)
@@ -684,7 +684,7 @@ def deepspeed_launcher(args):
             try:
                 distrib_run.run(args)
             except:
-                if debug:
+                if is_rich_available() and debug:
                     console = get_console()
                     console.print("\n[bold red]Using --debug, `torch.distributed` Stack Trace:[/bold red]")
                     console.print_exception(suppress=[__file__], show_locals=False)
diff --git a/src/accelerate/state.py b/src/accelerate/state.py
index 82ea288f0..00ba3ab67 100644
--- a/src/accelerate/state.py
+++ b/src/accelerate/state.py
@@ -14,11 +14,19 @@
 
 import os
 import warnings
-from distutils.util import strtobool
 
 import torch
 
-from .utils import DistributedType, get_ccl_version, is_ccl_available, is_deepspeed_available, is_tpu_available
+from .utils import (
+    DistributedType,
+    get_ccl_version,
+    get_int_from_env,
+    is_ccl_available,
+    is_deepspeed_available,
+    is_tpu_available,
+    parse_choice_from_env,
+    parse_flag_from_env,
+)
 from .utils.dataclasses import SageMakerDistributedType
 
 
@@ -26,25 +34,6 @@
     import torch_xla.core.xla_model as xm
 
 
-def get_int_from_env(env_keys, default):
-    """Returns the first positive env value found in the `env_keys` list or the default."""
-    for e in env_keys:
-        val = int(os.environ.get(e, -1))
-        if val >= 0:
-            return val
-    return default
-
-
-def parse_flag_from_env(key, default=False):
-    value = os.environ.get(key, str(default))
-    return strtobool(value) == 1  # As its name indicates `strtobool` actually returns an int...
-
-
-def parse_choice_from_env(key, default="no"):
-    value = os.environ.get(key, str(default))
-    return value
-
-
 # Inspired by Alex Martelli's 'Borg'.
 class AcceleratorState:
     """
diff --git a/src/accelerate/utils/__init__.py b/src/accelerate/utils/__init__.py
index b472ec556..b22518f9a 100644
--- a/src/accelerate/utils/__init__.py
+++ b/src/accelerate/utils/__init__.py
@@ -19,6 +19,7 @@
     SageMakerDistributedType,
     TensorInformation,
 )
+from .environment import get_int_from_env, parse_choice_from_env, parse_flag_from_env
 from .imports import (
     get_ccl_version,
     is_aim_available,
diff --git a/src/accelerate/utils/environment.py b/src/accelerate/utils/environment.py
new file mode 100644
index 000000000..9247bb4fe
--- /dev/null
+++ b/src/accelerate/utils/environment.py
@@ -0,0 +1,36 @@
+# Copyright 2022 The HuggingFace Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import os
+from distutils.util import strtobool
+
+
+def get_int_from_env(env_keys, default):
+    """Returns the first positive env value found in the `env_keys` list or the default."""
+    for e in env_keys:
+        val = int(os.environ.get(e, -1))
+        if val >= 0:
+            return val
+    return default
+
+
+def parse_flag_from_env(key, default=False):
+    """Returns truthy value for `key` from the env if available else the default."""
+    value = os.environ.get(key, str(default))
+    return strtobool(value) == 1  # As its name indicates `strtobool` actually returns an int...
+
+
+def parse_choice_from_env(key, default="no"):
+    value = os.environ.get(key, str(default))
+    return value
diff --git a/src/accelerate/utils/imports.py b/src/accelerate/utils/imports.py
index bdb53988a..c33258a92 100644
--- a/src/accelerate/utils/imports.py
+++ b/src/accelerate/utils/imports.py
@@ -20,6 +20,7 @@
 
 from packaging.version import parse
 
+from .environment import parse_flag_from_env
 from .versions import compare_versions, is_torch_version
 
 
@@ -126,7 +127,7 @@ def is_boto3_available():
 
 
 def is_rich_available():
-    return importlib.util.find_spec("rich") is not None
+    return (importlib.util.find_spec("rich") is not None) and (not parse_flag_from_env("DISABLE_RICH"))
 
 
 def is_sagemaker_available():


Review comments: body: Let's accept anything that's truthy here? Like yes/no, true/false, 0/1
diff_hunk: @@ -126,7 +127,7 @@ def is_boto3_available():
 
 
 def is_rich_available():
-    return importlib.util.find_spec("rich") is not None
+    return (importlib.util.find_spec("rich") is not None) and (not os.environ.get("DISABLE_RICH", "0") == "1")

Discussion: body: _The documentation is not available anymore as the PR was closed or merged._