No module named Image

前端 未结 5 1521
心在旅途
心在旅途 2020-12-13 19:10

Sorry for my grammar, I don\'t speak English. After I set filebrowser, tinymce, and grappelli, I get this error: No module named Image

try:
             


        
5条回答
  •  失恋的感觉
    2020-12-13 19:46

    You are missing PIL (Python Image Library and Imaging package). To install PIL I used

     pip install pillow
    

    For my machine running Mac OSX 10.6.8, I downloaded Imaging package and installed it from source. http://effbot.org/downloads/Imaging-1.1.6.tar.gz and cd into Download directory. Then run these:

        $ gunzip Imaging-1.1.6.tar.gz
        $ tar xvf Imaging-1.1.6.tar
        $ cd Imaging-1.1.6
        $ python setup.py install
    

    Or if you have PIP installed in your Mac

     pip install http://effbot.org/downloads/Imaging-1.1.6.tar.gz
    

    then you can use:

    from PIL import Image
    

    in your python code.

提交回复
热议问题