python/django - “Cannot use ImageField because Pillow is not installed”

后端 未结 11 1187
一向
一向 2021-01-17 11:38

I\'m joining a project, so I want to set up the environnment, so what I did is :

pip install -r requirements.txt

This fully installed all r

11条回答
  •  不思量自难忘°
    2021-01-17 12:06

    What worked for me was to uninstall Pillow from user folder and install it with sudo.

    Initial install was:

    $ pip3 install Pillow --user
    

    installed to: ~/.local/lib/python3.7/site-packages/Pillow-7.0.0.dist-info

    So first uninstalled it and then installed with sudo:

    $ pip3 uninstall Pillow
    $ sudo pip3 install Pillow
    

    new location: /usr/local/lib64/python3.7/site-packages/Pillow-7.0.0.dist-info and problem was fixed.

提交回复
热议问题