Linux 弹性豆茎

Linux 弹性豆茎,linux,django,scipy,amazon-elastic-beanstalk,yum,Linux,Django,Scipy,Amazon Elastic Beanstalk,Yum,我正试图在Amazon Elastic Beanstalk上运行的一个简陋的Django应用程序上安装scipy,但我无法让它工作 以下是重现我的问题的步骤: 常规材料来自: 我在这里不知所措。看起来我可以在一个有更多RAM的EC2实例上使用它,但我不能这样做,因为这会让我脱离免费层。有没有办法运行make命令以避免占用太多内存或其他解决方案?您可以尝试将其添加到.ebextensions/django.config中: commands: 01_no_cache: command:

我正试图在Amazon Elastic Beanstalk上运行的一个简陋的Django应用程序上安装scipy,但我无法让它工作

以下是重现我的问题的步骤:

常规材料来自:


我在这里不知所措。看起来我可以在一个有更多RAM的EC2实例上使用它,但我不能这样做,因为这会让我脱离免费层。有没有办法运行make命令以避免占用太多内存或其他解决方案?

您可以尝试将其添加到
.ebextensions/django.config中:

commands:
  01_no_cache:
    command: "/opt/python/run/venv/bin/pip install --no-cache-dir -r /opt/python/current/app/requirements.txt"
如果检查
/var/log/eb activity.log
(或者如果安装了eb CLI,只需键入
eb logs
),您可以在此处看到错误:

MemoryError
2017-08-10 11:40:25,557 ERROR    Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 2
据我所知,如果将特定命令包含在django.config中,则可以为EB提供这些命令。如前所述,您可以禁用缓存


这对我来说很有效。

这里也一样。我找到了这样一种方法来告诉EB上传我的pip版本:
commands:00\u update\u pip:command:“/opt/python/run/venv/bin/pip install——升级pip”
。我很想知道是否有任何方法可以告诉EB类似于
pip安装--no-cache dir-r requirements.txt
。我记得我在EB实例上直接安装软件包时遇到过几次,我是这样解决的。我的答案对你有用吗?@MattiaPaterna在你回答so idk时,我已经停止了工作
commands:
  01_no_cache:
    command: "/opt/python/run/venv/bin/pip install --no-cache-dir -r /opt/python/current/app/requirements.txt"
MemoryError
2017-08-10 11:40:25,557 ERROR    Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 2