Display an image with Python
Question: I tried to use IPython.display with the following code:

    
    
    from IPython.display import display, Image
    display(Image(filename='MyImage.png'))
    

I also tried to use matplotlib with the following code:

    
    
    import matplotlib.pyplot as plt
    import matplotlib.image as mpimg
    plt.imshow(mpimg.imread('MyImage.png'))
    

In both cases, nothing is displayed, not even an error message.


Answer: In a much simpler way you can do the same using

    
    
    import Image
    
    image = Image.open('image.jpg')
    image.show()
    

