जब मैं पीआईएल के साथ काम कर रहा हूं, मुझे बहुत सारे पीआईएल मॉड्यूल आयात करना होगा। मैं तीन तरीकों के साथ प्रयोग किया गया था यह करने के लिए है, लेकिन पिछले एक काम करता है सब मेरे लिए तार्किक किया जा रहा है के बावजूद:मेरा पायथन पीआईएल क्यों काम नहीं कर रहा है?
पूरा जनहित याचिका आयात और बुला यह कोड में मॉड्यूल है: नहीं
>>> import PIL
>>> image = PIL.Image.new('1', (100,100), 0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Image'
सब कुछ आयात कर रहा है नहींं
>>> from PIL import *
>>> image = Image.new('1', (100,100), 0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'Image' is not defined
जनहित याचिका से कुछ मॉड्यूल आयात:: ठीक है
>>> from PIL import Image
>>> image = Image.new('1', (100,100), 0)
>>> image
<PIL.Image.Image image mode=1 size=100x100 at 0xB6C10F30>
>>> # works...
जनहित याचिका से
मुझे यहां क्या नहीं मिला?