I'm running a python script but it won't show the picture.
I have an apple.jpg image in a directory with this program and it should show the picture, but it doesn't. Here is the code:
#!/usr/bin/env python from PIL import Image Apple = Image.open("apple.jpg") Apple.show()
My OS is Ubuntu and this program just gets completed without showing any error.
Why Is My Image Not Showing up in HTML? One of the reasons why your HTML image not showing in browser is that its file is not located in the same folder that is indicated within your tag. Also, the image may not load because the file name specified in the <img> tag does not match that of your image file.
You cannot display images in a console window. You need a graphical toolkit such as Tkinter, PyGTK, PyQt, PyKDE, wxPython, PyObjC, or PyFLTK. There are plenty of tutorials on how to create simple windows and loading images in python.
It works for me on Ubuntu. It displays the image with Imagemagick. Try this:
sudo apt-get install imagemagick
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With