我使用所有这些注释正确安装枕头:点安装枕头 - 点印索尔枕头==6.2.0 -
pip install Pillow
Requirement already satisfied: Pillow in c:program files (x86)python38-32libsite-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-32libsite-packages (7.2.0)
并成功更新 Pip,但是当我想添加图像字段时 像这样:image = models.ImageField()
,我有这个错误:
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".
有些人说这是针对您的Windows版本,但我安装了pip 对于 win64
请帮忙,谢谢
假设您使用以下命令调用 manage.py:
python manage.py runserver
python3.7 manage.py runserver
或类似的东西尝试使用
python -m pip install pillow==6.2.0
这会将其安装到目标版本中,请确保将python
替换为您用于运行 manage.py 的任何命令,例如python3.8
或类似命令。
希望这会有所帮助!