django建立上传图片类迁移数据时提示app01.Images.images: (fields.E210) Cannot use ImageField because Pillow is not installed.

from django.db import models


# Create your models here.
class Images(models.Model):
    """
    上传图片
    """
    images = models.ImageField(upload_to='media') # 指定上传图片的路径(static/media)

  

使用python manage.py makemigrations和ython manage.py migrate迁移数据提示

SystemCheckError: System check identified some issues:

ERRORS:
app01.Images.images: (fields.E210) Cannot use ImageField because Pillow is not installed.
HINT: Get Pillow at https://pypi.org/project/Pillow/ or run command "python -m pip install Pillow".

 

没有安装 pillow 

解决方法pip install pillow

posted @ 2020-09-27 15:20  哥,咱家有钱啦  阅读(725)  评论(0)    收藏  举报