Image.show()将不显示图片 [英] Image.show() won't display the picture
本文介绍了Image.show()将不显示图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在运行python脚本,但不会显示图片.
I'm running a python script but it won't show the picture.
我在该程序的目录中有一个apple.jpg图像,它应该显示图片,但没有.这是代码:
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()
我的操作系统是Ubuntu,该程序只需完成就不会显示任何错误.
My OS is Ubuntu and this program just gets completed without showing any error.
推荐答案
它在Ubuntu上对我有效.它使用Imagemagick显示图像.试试这个:
It works for me on Ubuntu. It displays the image with Imagemagick. Try this:
sudo apt-get install imagemagick
这篇关于Image.show()将不显示图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文