[Tutor] problem importing the PIL and cPickle module

Kent Johnson kent37 at tds.net
Fri Nov 6 23:08:31 CET 2009


On Fri, Nov 6, 2009 at 12:56 PM, Khalid Al-Ghamdi <emailkgnow at gmail.com> wrote:
> Hi,
> I'm currently using python 3.1 and I tried to import PIL and cPickle as per
> tutorial i was following, but both gave me errors. I tried to download PIL
> from its respective site, but it only installed on the python 2.6
> directory.

If you are using a Python 2 tutorial you will find it much easier to
use Python 2.6 instead of 3.1.

> As for cPickle, I couldn't find it, but I found some kind of reference to
> _pickle in the python documentation.
> my questions:
> is there a way to import PIL to python 3?

No, PIL is not available for python 3

> is _pickle the same as cPickle?

More or less, but it is used automatically when it is available. You
should just use pickle in Python 3.

Kent


More information about the Tutor mailing list