B
B
BEKa T2019-05-11 16:48:53
Django
BEKa T, 2019-05-11 16:48:53

Why is it giving a Pillow error?

Displays an error

Performing system checks...

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f3480dc5598>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django/utils/autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run
    self.check(display_num_errors=True)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 425, in check
    raise SystemCheckError(msg)
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
main.Post.image: (fields.E210) Cannot use ImageField because Pillow is not installed.
  HINT: Get Pillow at https://pypi.org/project/Pillow/ or run command "pip install Pillow".

System check identified 1 issue (0 silenced).

Although I already have Pillow installed
~# sudo -H pip install Pillow
Requirement already satisfied: Pillow in /usr/local/lib/python3.5/dist-packages (6.0.0)

And if you just pip install Pillowdo it, again an error
~# pip install Pillow
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2019-05-11
@Bread09

sudo apt install python3-pillow

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question