';模块';对象在使用PIL在python中打开图像时不可调用
我想用python打开图像。我一直在使用PIL打开图像,但它抛出'module'错误是不可调用的';模块';对象在使用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 您确定要使用显示器吗?你想要什么?也许表演。
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模块