3
votes

I'm trying to run a flask application which has pandas dependency. Without having python-devel installed, pandas cannot be installed. So first I need to install gcc-c++ and python devel according to this thread: 'gcc' failed during pandas build on AWS Elastic Beanstalk

Now, my .elasticbeanstalk/config.yml looks like:

branch-defaults:
  default:
    environment: flask-env
    group_suffix: null
global:
  application_name: flask-sample-app
  branch: null
  default_ec2_keyname: flask-sample-app
  default_platform: Python 3.4
  default_region: eu-west-1
  include_git_submodules: true
  instance_profile: null
  platform_name: null
  platform_version: null
  profile: null
  repository: null
  sc: null
  workspace_type: Application
packages:
  yum:
    gcc-c++: []
    python-devel: []

But after successful eb deploy command, I connect to it via eb ssh and see that it wasn't installed. Is my config.yml correct?

2
YAML files are very sensitive to whitespace, and your packages section looks like it's using three-space indents while the other sections are using two-space indents...might be a problem. You can also look at /var/log/eb-activity.log to see if there are any informative log messages.Brian
ahh yes, I fixed the indentation problem, but still not being installed. should I do something addition to eb deploy after changing the config file? I'm currently not using git system, just trying to figure out the elasticbeanstalk.Muatik
eb deploy should be all that's needed. Can you post your /var/log/eb-activity.log?Brian

2 Answers

3
votes

When I created a yaml file in .ebextensions instead of .elasticbeanstalk, it worked. I was simply putting the yaml file under the wrong directory.

.elasticbeanstalk/pandas.yml:

packages:
  yum:
    gcc-c++: []
    python3?-devel.x*: []

I got error while trying to install python-devel: []:

Command failed on instance. Return code: 1 Output: Yum does not have python-devel available for installation

So the correct devel package name, in my case, is either 'python27-devel.x86_64' or 'python35-devel.x86_64'

https://forums.aws.amazon.com/thread.jspa?threadID=233268

How to install python3-devel on red hat 7

0
votes

Pandas and NumPy seem to give the most trouble whatever way you go to deploy something. I haven't used elastic-beanstalk myself but have done it direct on servers and in docker.

Can see one difference with what you have and what worked for me. I think you need both gcc and g++ as per this

So perhaps add a line before those last lines of yours:

packages:
  yum:
    gcc: []
    gcc-c++: []
    python-devel: []

Am just translating accross what worked in another area.