diff --git a/wandb/integration/tensorboard/log.py b/wandb/integration/tensorboard/log.py
index <HASH>..<HASH> 100644
--- a/wandb/integration/tensorboard/log.py
+++ b/wandb/integration/tensorboard/log.py
@@ -83,7 +83,14 @@ def tf_summary_to_dict(tf_summary_str_or_pb, namespace=""):  # noqa: C901
         return None
 
     def encode_images(img_strs, value):
-        from PIL import Image
+        try:
+            from PIL import Image
+        except ImportError:
+            wandb.termwarn(
+                'Install pillow if you are logging images with Tensorboard. To install, run "pip install pillow".',
+                repeat=False,
+            )
+            return
 
         if len(img_strs) == 0:
             return
[WB-<I>] Check if pillow is installed before importing (#<I>)

* Check if pillow is installed before importing



* Skip the image encoding if pillow isn't installed instead of exiting out of the whole run.