如何在Amazon AWS Elastic Beanstalk上使用SciPy部署Django

时间:2016-03-02 22:14:36

标签: django amazon-web-services numpy scipy elastic-beanstalk

由于pip install -r requirements.txt可能无法正常运行,因为它可能会在scipy之前编译numpy并收到错误。

requirements.txt如下:

pip==8.0.3
Django==1.9.0
psycopg2==2.6.1
wheel==0.24.0
requests
numpy==1.7.2
scipy==0.15.1

无论如何,我尝试使用.ebextensions/xxx.config来解决此问题,因此我从上面的列表中删除了scipy并将其添加到配置文件中,如下所示:

packages:
  yum:
    git: []
    gcc: []
    gcc-c++: []
    gcc-gfortran: []
    readline-devel: []
    postgresql94-devel: []
    atlas: []
    blas: []
    lapack-devel: []
    blas-devel: []
    atlas-devel: []
  commands:
    00-prep-environment:
      command: "scripts/scipy.sh"

scipy.sh

/opt/python/run/venv/bin/pip install scipy
/opt/python/run/venv/bin/pip install Pillow
/opt/python/run/venv/bin/pip freeze

然而,当我在我的Django代码中执行scipy not found时,这仍然无法正常工作,我遇到import scipy错误。我尝试了其他人的许多解决方案但不适用于我。任何人都有如何在Amazon AWS Elastic Beanstalk上使用SciPy部署Django的经验?谢谢!

0 个答案:

没有答案