Solution If your iterm can't show images, to solve it, write os.environ['TMUX'] = 'tmux' before calling imgcat() in your python script. import os os.environ['TMUX'] = 'tmux' # insert this line imgcat(img) With interpreter, before assigning os.environ couldn't show images. On the other hand, after sh…