PIL /JPEG Library: “decoder jpeg not available”

后端 未结 8 1224
醉酒成梦
醉酒成梦 2021-01-29 23:50

I tried to use PIL to do some JPEG work in my django app with PIL but I\'m getting this IOError.. not sure what to do.

\"\"decoder jpeg not available\"\"
         


        
8条回答
  •  庸人自扰
    2021-01-30 00:06

    A stronger answer can be found at install pil on virtualenv with libjpeg

    For me what finally worked on Ubutu was:

    pip uninstall PIL
    sudo apt-get install libjpeg8-dev
    pip install PIL
    

    The Python Imaging Library (PIL) seems really picky about version and location of the jpeg libraries. And because PIL is written in C and compiled, you need the development versions of the library in addition to the runtime versions.

提交回复
热议问题