How do I auto load packages (such as libjpeg-dev) to my Elastic Beanstalk App?

后端 未结 2 929
南方客
南方客 2021-01-16 01:26

I have a auto scaling Elastic Beanstalk app running Python where I want to use PIL. When I do, it says that my jpeg decoder is missing and that I need to install libjpeg.

2条回答
  •  無奈伤痛
    2021-01-16 01:58

    I ran into the same issue, instead of setting up a completely new Elastic Beanstalk app, I connected to the EC2 instance via SSH and re-installed PIL (or Pillow).

    On EC2 instance, I ran the following commands:

    source /opt/python/run/venv/bin/activate
    pip uninstall PIL
    pip install PIL
    

    Now PIL supports jpeg encoding =)

提交回复
热议问题