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

后端 未结 11 1167
一向
一向 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:08

    macOS High Sierra 10.13.6 My solution was

    pip3 install Pillow
    

    Not

    pip install Pillow
    
    0 讨论(0)
  • 2021-01-17 12:11

    I do not know why, but uninstalling and then reinstalling Pillow (same version) solved this problem for me.

    python -m pip uninstall Pillow
    python -m pip install Pillow
    

    The Pillow version was 7.1.1.

    0 讨论(0)
  • 2021-01-17 12:13

    If you are using Pillow 4.1.0 with Python 3.6.0 then upgrading the Python version will fix this issue. Found the solution here: https://github.com/python-pillow/Pillow/issues/2479#issuecomment-292252147

    0 讨论(0)
  • 2021-01-17 12:17

    I was having this problem on a Mac with Python 3.6.4. The solution was to uninstall Pillow 5.1.0 and instead install 5.0.0.

    pip uninstall Pillow
    pip install Pillow==5.0.0
    
    0 讨论(0)
  • 2021-01-17 12:20

    I was too getting same problem while implememnting Image Upload using CLoudinary , but found the Above answer, but in some other way.

     sudo pip uninstall PIL
    
     sudo pip uninstall Pillow
    
     sudo pip install Pillow
    

    After that mine Problem was solved !

    0 讨论(0)
提交回复
热议问题