Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
';模块';对象在使用PIL在python中打开图像时不可调用_Python_Image_Jupyter Notebook_Ipython_Python Imaging Library - Fatal编程技术网

';模块';对象在使用PIL在python中打开图像时不可调用

';模块';对象在使用PIL在python中打开图像时不可调用,python,image,jupyter-notebook,ipython,python-imaging-library,Python,Image,Jupyter Notebook,Ipython,Python Imaging Library,我想用python打开图像。我一直在使用PIL打开图像,但它抛出'module'错误是不可调用的 import PIL from PIL import Image image=Image.open(r'C:\Users\intel\Downloads\11fcf12ff3cf97e8e7a88f3e485255e6.jpg') print(image) display(image) #the error is thrown here 您确定要使用显示器吗?你想要什么?也许表演。

我想用python打开图像。我一直在使用PIL打开图像,但它抛出'module'错误是不可调用的

import PIL
from PIL import Image

image=Image.open(r'C:\Users\intel\Downloads\11fcf12ff3cf97e8e7a88f3e485255e6.jpg')
print(image)

display(image)       #the error is thrown here

您确定要使用显示器吗?你想要什么?也许表演。。。在PIL库中有一个类似show()的方法,所以在您的例子中,它应该是image.show()

什么是
display
?它的定义是什么?这是否回答了你的问题?show()无法打开jupiter笔记本中的图像。它宁愿使用本机app在新窗口中打开映像,然后您需要使用IPython模块