Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9454 > unrolled thread
| Started by | Chris Rebert <clp2@rebertia.com> |
|---|---|
| First post | 2011-07-13 18:04 -0700 |
| Last post | 2011-07-13 18:04 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: should i install python image library by myself? Chris Rebert <clp2@rebertia.com> - 2011-07-13 18:04 -0700
| From | Chris Rebert <clp2@rebertia.com> |
|---|---|
| Date | 2011-07-13 18:04 -0700 |
| Subject | Re: should i install python image library by myself? |
| Message-ID | <mailman.1013.1310605495.1164.python-list@python.org> |
On Wed, Jul 13, 2011 at 5:18 PM, think <thinke365@gmail.com> wrote: > when i type import image in the python interactive command, i am surprised > to find that it does not work. the details are as follows: What led you to expect that exact command would work in the first place?? >>>> import image > Traceback (most recent call last): > File "<stdin>", line 1, in ? > ImportError: No module named image > > i wonder the image library should be a buildin module, then why i cannot > import it? > what's wrong? or some version of python does not include image library as a > buildin module? There is no standard library module by that name; no first-party versions of Python include such a module. Thus, it's no surprise that your import throws an exception. > so can anybody recommend a version of python which include image libary, I can only guess that your "image" library refers to either the "Image" (capitalization matters!) *submodule* of PIL (http://www.pythonware.com/products/pil/ ), or the "Image" class of Tkinter (http://docs.python.org/library/tkinter.html#images ). The former requires installation of PIL, and would then be correctly imported via: from PIL import Image The latter is typically built as part of a default Python installation and would be correctly imported via: from Tkinter import Image # Python 2.x or: from tkinter import Image # Python 3.x Cheers, Chris -- http://rebertia.com
Back to top | Article view | comp.lang.python
csiph-web