1
votes

I had an py27 application running on aws ElasticBeanStalk for over a year. Recently it stopped working. So I tried to redeploy. During redeploy I got the following error in the logs:

Return code: 1 Output: [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/03deploy.py] command failed with error code 1: /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py New python executable in /opt/python/run/venv/bin/python27 Not overwriting existing python script /opt/python/run/venv/bin/python (you must use /opt/python/run/venv/bin/python27)

Can somebody tell me where I will find /opt/python/run/venv/bin/python? How can I change it to /opt/python/run/venv/bin/python27?

Thanks

1

1 Answers

0
votes

When you redeployed, you opted into the latest beanstalk version, which uses a different AMI than the one originally used. If you're familiar with the concept of ebextensions then you're probably looking to add a file like this:

.ebextensions/python.config:
ln -s /opt/python/run/venv/bin/python27 /opt/python/run/venv/bin/python