- Mais recentes
- Mais votos
- Mais comentários
Hi,
I've been getting the same error when I try to deploy a Dash (plotly) application on AWS Beanstalk. Just to clarify did you execute the pip install gunicorn from the CLI on Beanstalk or did you run it in the virtual environment to store the dependency in the requirements.txt file?
In case anyone comes across this same problem, I never figured out the true root cause for this application. It was probably some configuration conflict between the Django app and the Elastic Beanstalk deployment.
I ended up starting from scratch with a fresh Django and Elastic Beanstalk CLI install but still ran into the same error. It turned out that the instructions online on Amazon's website are outdated and the newer Amazon Linux 2 does not have gunicorn installed by default. Installing gunicorn was the biggest help in solving the problem.
pip install gunicorn
Also, in case it helps, the following buildspec.yml worked:
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
pre_build:
commands:
- lsb_release -a
- python -m venv venv
- . venv/bin/activate
- pip install --upgrade pip
- pip install -r mysite/requirements.txt
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- '**/*'
base-directory: mysite
Conteúdo relevante
- AWS OFICIALAtualizada há um ano
- AWS OFICIALAtualizada há 9 meses
- AWS OFICIALAtualizada há 5 meses
Hi, were you able to resolve this?
Thanks in advanced!