Issue
I'm trying to display an image in the ipython qtconsole via:
from IPython.display import Image
Image(filename='sky1024px.jpg')
But I get the following output
Out[6]: <IPython.core.display.Image object>
I installed python via Anaconda which has the needed library to display images. I tried searching stackoverflow and couldn't find any answers yet.
The version of python i'm running is:
IPython QtConsole 3.2.0
Python 2.7.10 |Anaconda 2.3.0 (x86_64)| (default, May 28 2015, 17:04:42)
The reason I want to get this working is I'm messing around with the google deepdream project which looks pretty fun and crazy. See: https://github.com/google/deepdream/blob/master/dream.ipynb
Sorry if this is simple question never used python and i'm been banging my head on this for a few hours!
Thanks!
Solution
The following code should work although I must admit I don't use IPython that much.
from PIL import Image
im = Image.open('/home/students/sky1024px.jpg')
im.show()
Answered By - Pyroz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.