Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从你所说的看起来,即This is not all of the code。 您或其他一些导入已经声明了一些变量/类调用Image,这已经覆盖了Image导入的类PIL。
This is not all of the code
Image
PIL
要专门使用PIL Image该类,请使用:
img = PIL.Image.open("majestic creature.jpeg").convert("RGB")