问题描述
我正在尝试运行具有pandas
依赖项的flask应用程序.如果未安装python-devel,则无法安装pandas.因此,首先我需要根据该线程安装gcc-c ++和python devel:
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
现在,我的.elasticbeanstalk/config.yml
看起来像:
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: []
但是成功执行eb deploy
命令后,我通过eb ssh
连接到它,并发现未安装它.我的config.yml是否正确?
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?
推荐答案
当我在.ebextensions
而不是.elasticbeanstalk
中创建了Yaml文件时,它起作用了.我只是将yaml文件放在错误的目录下.
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:
.elasticbeanstalk/pandas.yml:
packages:
yum:
gcc-c++: []
python3?-devel.x*: []
尝试安装python-devel: []
时出现错误:
因此,在我的情况下,正确的devel软件包名称是'python27-devel.x86_64'或'python35-devel.x86_64'
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
这篇关于elasticbeanstalk gcc和python-devel安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!