-1
CommandError: System check identified some issues:

ERRORS:
estore.Header.img: (fields.E210) Cannot use ImageField because Pillow is not installed.
    HINT: Get Pillow at https://pypi.python.org/pypi/Pillow or run command "python -m pip install pillow".
products.Product.img: (fields.E210) Cannot use ImageField because Pillow is not installed.
    HINT: Get Pillow at https://pypi.python.org/pypi/Pillow or run command "python -m pip install pillow".

I have latest version of Pillow installed (7.2.0)

requirement already satisfied pillow in c:\users\admin\appdata\local\programs\python\python38\lib\site-packages (7.2.0)

I m using python version 3.8.5, visual studio version v16.7.0 and Django 3.1 Please help me!

  • show the output of `pip freeze | grep -iE '(django|pil)'` – Tom Wojcik Sep 23 '20 at 09:16
  • asgiref==3.2.10 atomicwrites==1.4.0 attrs==19.3.0 colorama==0.4.3 Django==3.1 django-mysql==3.8.1 iniconfig==1.0.1 install==1.3.3 more-itertools==8.4.0 mysqlclient @ file:///C:/mysqlclient-1.4.6-cp38-cp38-win32.whl olefile==0.46 packaging==20.4 Pillow==7.2.0 pluggy==0.13.1 psycopg2==2.8.5 psycopg2-binary==2.8.5 py==1.9.0 PyMySQL==0.10.1 pyparsing==2.4.7 pytest==6.0.1 pytz==2020.1 six==1.15.0 sqlparse==0.3.1 toml==0.10.1 – Pancham Jain Sep 23 '20 at 09:40
  • Does this answer your question? [python/django - "Cannot use ImageField because Pillow is not installed"](https://stackoverflow.com/questions/25662073/python-django-cannot-use-imagefield-because-pillow-is-not-installed) – Tom Wojcik Sep 23 '20 at 10:17

2 Answers2

1

Try to install pillow in your virtual environment!

cmd:

workon [your virtual env]
pip install Pillow

if this does not work try this:

pip uninstall Pillow
pip install Pillow==5.0.0
HermanTheGerman
  • 232
  • 1
  • 8
  • It gives error on installing: RuntimeWaring: Pillow does not yet support Python 3.8 and does not yet provide prebuilt Windows binaries. We do not recommend building from source on Windows. – Pancham Jain Sep 23 '20 at 09:22
  • python -m pip install --upgrade pip python -m pip install --upgrade pillow – HermanTheGerman Sep 23 '20 at 09:23
  • Successfully installed but giving same error when trying migrations – Pancham Jain Sep 23 '20 at 09:31
  • You mean, if you manage.py makemigrations, you get this error: "products.Product.img: (fields.E210) Cannot use ImageField because Pillow is not installed" ? Can you share your virtual env with us? -pip freeze – HermanTheGerman Sep 23 '20 at 09:35
  • asgiref==3.2.10 atomicwrites==1.4.0 attrs==19.3.0 colorama==0.4.3 Django==3.1 django-mysql==3.8.1 iniconfig==1.0.1 install==1.3.3 more-itertools==8.4.0 mysqlclient @ file:///C:/mysqlclient-1.4.6-cp38-cp38-win32.whl olefile==0.46 packaging==20.4 Pillow==7.2.0 pluggy==0.13.1 psycopg2==2.8.5 psycopg2-binary==2.8.5 py==1.9.0 PyMySQL==0.10.1 pyparsing==2.4.7 pytest==6.0.1 pytz==2020.1 six==1.15.0 sqlparse==0.3.1 toml==0.10.1 – Pancham Jain Sep 23 '20 at 09:41
  • you can try to use antoher pillow version -pip install Pillow==2.2.2 – HermanTheGerman Sep 23 '20 at 10:26
  • "microsoft visual c++ 14.0 is required get it with microsoft visual c++ build tools" when trying to install Pillow==2.2.2 – Pancham Jain Sep 23 '20 at 11:35
-1

I think I will be able able to answer this.
My system info are follows:

  • Windows 10
  • Django version 3.2
  • Python version 3.7

I found on the Pillow documentation that the tested Pillow version is 7.1.0
You can read here.
for this, you need to launch cmd or anaconda prompt and type

pip uninstall Pillow
pip install Pillow==7.1.0