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,448
  • 15
  • 61
  • 108

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
  • 96,286
  • 20
  • 232
  • 224