I recently created a new python program using the latest stable release of python (3.5). Unfortunately, AWS EB does not provide a 3.5 base image. I have been trying to configure .ebextensions
to get the image to upgrade the python distro as it's first action. I have not had success. I have tried the following:
Packages
packages:
yum:
postgresql93-devel: []
python35: []
Commands
container_commands:
01_install_packages:
command: 'yum install -y python35 python35-pip'
In the case of container_commands
, the log did show python 35 successfully installing. However, our code (in a follow-up command) then failed in a way that is only possible if python version 3.4 or lower is sourced. I am assuming that although 3.5 installed the environment did not switch to it as the source and continued to use the 3.4 distro.
We cannot manually modify the environment, because we need our configuration to be ready for auto-scaling. Thus, the solution must come from some configuration in .ebextensions
. Any help here would be very appreciated.
UPDATE
I received an email from AWS support informing me that, because the operating system and application python environments are tightly coupled (ie the same), it is not possible to change the default python version for the application to python 3.5. They recommended I create a docker image. I've started looking into how to do that. If I come up with a solution I will post here.