Pillow installed correctly but Image Field got error Pillow is not installed - Django

Viewed 155

I install correctly Pillow using all these comments: Pip install Pillow - Pip Insall Pillow==6.2.0 -

pip install Pillow
Requirement already satisfied: Pillow in c:\program files (x86)\python38-32\lib\site-packages (7.2.0)

python -m pip install --upgrade Pillow

python -m pip install --upgrade Pillow
Requirement already up-to-date: Pillow in c:\program files (x86)\python38-32\lib\site-packages (7.2.0)

And update Pip as successfully, but when I want to add ImageField like this: image = models.ImageField(), I've got this error:

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

some people say this is for the version of your windows but I install pip for win64

please help, thank you

1 Answers

Let's say you call manage.py using:

python manage.py runserver

python3.7 manage.py runserver

or something similar try installing pillow using

python -m pip install pillow==6.2.0

this will install it into the targeted version, make sure to replace python with whichever command you used to run manage.py, like python3.8 or similar.

Hope this would help!

Related