Now I am trying to upload my PHP app to AWS Elastic Beanstalk with PHP platform.
My PHP executes script.py with Python2, so I need to install Python2 to Elastic Beanstalk. What shoud I do at first ? And where the Python2 would be installed ?
I think you might have to use .ebextensions to install Python2.
Basically, your application source code would need to have a .ebextensions file with a snippet of the following kind:
packages:
yum:
python27-devel.x86_64: []
If you environment's operation system is Amazon Linux, perform yum search python to determine the set of Python2.7 packages you need and then list them under packages/yum in the above file.