无法使用ImageField,因为未安装Pillow

2024-10-01 11:20:59 发布

您现在位置:Python中文网/ 问答频道 /正文

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".

我已安装最新版本的枕头(7.2.0)

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

我使用的是python版本3.8.5、visual studio版本v16.7.0和Django 3.1 请帮帮我


Tags: installed版本pypifieldsimgisusenot
1条回答
网友
1楼 · 发布于 2024-10-01 11:20:59

尝试在虚拟环境中安装枕头

命令:

workon [your virtual env]
pip install Pillow

如果这不起作用,请尝试以下方法:

pip uninstall Pillow
pip install Pillow==5.0.0

相关问题 更多 >