Django OS X Wrong JPEG library version: library is 80, caller expects 62 sorl.thumbnail

前端 未结 4 844
野趣味
野趣味 2021-02-06 17:48

Im using sorl.thumbnail for django locally on my mac and have been having trouble with PIL, but today i finally managed to get it installed - was some trouble with libjpeg.

4条回答
  •  眼角桃花
    2021-02-06 18:24

    Like a previous answer, I had a slightly different problem than the OP, but I wanted to share my solution here to help someone in the future.

    The only thing that worked for me was forcing pip to build pillow from source after installing the dev version of the needed libraries (my code was editing a jpg and adding a label using a custom font). This was on a ARM based embedded device running Ubuntu Linux using Python 3.7.3

    apt-get install -y libjpeg-dev libfreetype6-dev
    pip3 install pillow --global-option="build_ext" --global-option="--enable-jpeg" --global-option="--enable-freetype" 
    

提交回复
热议问题