Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mongoengine.fields.ImproperlyConfigured: PIL library was not found

When I try to import a MongoEngine class which has an ImageField, an error says:

mongoengine.fields.ImproperlyConfigured: PIL library was not found

My class structure is like this:

class TrafficSign(Document):
    name = StringField()
    image = ImageField()
    type = StringField()
    desc = StringField()
    source = StringField()

Whats the problem?

like image 705
ehsan shirzadi Avatar asked Sep 12 '14 15:09

ehsan shirzadi


1 Answers

You need to install Pillow, which provides the PIL module. sudo pip install Pillow (drop the sudo if on Windows) ought to do it.

like image 79
MattDMo Avatar answered Nov 12 '22 04:11

MattDMo