diff --git a/setup.py b/setup.py
index 4bc977029..409399b17 100644
--- a/setup.py
+++ b/setup.py
@@ -21,9 +21,10 @@
 extras["test_prod"] = ["pytest", "pytest-xdist", "pytest-subtests", "parameterized"]
 extras["test_dev"] = ["datasets", "evaluate", "transformers", "scipy", "sklearn", "deepspeed<0.7.0", "tqdm"]
 extras["testing"] = extras["test_prod"] + extras["test_dev"]
+extras["rich"] = ["rich"]
 
 extras["test_trackers"] = ["wandb", "comet-ml", "tensorboard"]
-extras["dev"] = extras["quality"] + extras["testing"]
+extras["dev"] = extras["quality"] + extras["testing"] + extras["rich"]
 
 extras["sagemaker"] = [
     "sagemaker",  # boto3 is a required package in sagemaker
@@ -50,7 +51,7 @@
         ]
     },
     python_requires=">=3.7.0",
-    install_requires=["numpy>=1.17", "packaging>=20.0", "psutil", "pyyaml", "torch>=1.4.0", "rich"],
+    install_requires=["numpy>=1.17", "packaging>=20.0", "psutil", "pyyaml", "torch>=1.4.0"],
     extras_require=extras,
     classifiers=[
         "Development Status :: 5 - Production/Stable",
diff --git a/src/accelerate/__init__.py b/src/accelerate/__init__.py
index 03a7198ac..10c258efa 100644
--- a/src/accelerate/__init__.py
+++ b/src/accelerate/__init__.py
@@ -16,7 +16,11 @@
     InitProcessGroupKwargs,
     find_executable_batch_size,
     infer_auto_device_map,
+    is_rich_available,
     load_checkpoint_in_model,
-    rich,
     synchronize_rng_states,
 )
+
+
+if is_rich_available():
+    from .utils import rich
diff --git a/src/accelerate/commands/launch.py b/src/accelerate/commands/launch.py
index 491ea5ad3..c7f235843 100644
--- a/src/accelerate/commands/launch.py
+++ b/src/accelerate/commands/launch.py
@@ -39,22 +39,25 @@
     _filter_args,
     get_launch_prefix,
     is_deepspeed_available,
+    is_rich_available,
     is_sagemaker_available,
     is_torch_version,
     patch_environment,
 )
 from accelerate.utils.constants import DEEPSPEED_MULTINODE_LAUNCHERS
 from accelerate.utils.dataclasses import SageMakerDistributedType
-from rich import get_console
-from rich.logging import RichHandler
 
 
-if is_torch_version(">=", "1.9.0"):
-    import torch.distributed.run as distrib_run
+if is_rich_available():
+    from rich import get_console
+    from rich.logging import RichHandler
+
+    FORMAT = "%(message)s"
+    logging.basicConfig(format=FORMAT, datefmt="[%X]", handlers=[RichHandler()])
 
 
-FORMAT = "%(message)s"
-logging.basicConfig(format=FORMAT, datefmt="[%X]", handlers=[RichHandler()])
+if is_torch_version(">=", "1.9.0"):
+    import torch.distributed.run as distrib_run
 
 logger = logging.getLogger(__name__)
 
diff --git a/src/accelerate/utils/__init__.py b/src/accelerate/utils/__init__.py
index 2b8f566f0..6ec2f4ac4 100644
--- a/src/accelerate/utils/__init__.py
+++ b/src/accelerate/utils/__init__.py
@@ -27,6 +27,7 @@
     is_comet_ml_available,
     is_datasets_available,
     is_deepspeed_available,
+    is_rich_available,
     is_sagemaker_available,
     is_tensorboard_available,
     is_tpu_available,
diff --git a/src/accelerate/utils/imports.py b/src/accelerate/utils/imports.py
index 3efb61034..6015f2c14 100644
--- a/src/accelerate/utils/imports.py
+++ b/src/accelerate/utils/imports.py
@@ -111,6 +111,10 @@ def is_boto3_available():
     return importlib.util.find_spec("boto3") is not None
 
 
+def is_rich_available():
+    return importlib.util.find_spec("rich") is not None
+
+
 def is_sagemaker_available():
     return importlib.util.find_spec("sagemaker") is not None
 
diff --git a/src/accelerate/utils/rich.py b/src/accelerate/utils/rich.py
index 7a54c8b5a..2d48661b7 100644
--- a/src/accelerate/utils/rich.py
+++ b/src/accelerate/utils/rich.py
@@ -12,7 +12,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from rich.traceback import install
+from .imports import is_rich_available
 
 
-install(show_locals=False)
+if is_rich_available():
+    from rich.traceback import install
+
+    install(show_locals=False)
+
+else:
+    raise ModuleNotFoundError("To use the rich extension, install rich with `pip install rich`")



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