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?
You need to install Pillow
, which provides the PIL
module. sudo pip install Pillow
(drop the sudo
if on Windows) ought to do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With