5

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?

ehsan shirzadi
  • 4,709
  • 16
  • 69
  • 112

1 Answers1

5

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

MattDMo
  • 100,794
  • 21
  • 241
  • 231