在Elastic Beanstalk中安装SciPy / LaPack / ATLAS / BRAS

时间:2017-06-20 16:48:08

标签: python amazon-web-services scipy elastic-beanstalk lapack

我正在关注AWS Elastic Beanstalk的Flask教程来部署我的应用程序。虽然我收到错误您的requirements.txt无效 - 完整如下。我自己不写需求文件,我通过pip freeze命令生成它。

当我使用scipy.optimize模块时,问题似乎发生了。但是,脚本在我的本地服务器上运行没有任何问题。 似乎问题来自未正确导入的lapack / atlas / cblas。 我已经尝试了

pip install scipy
pip install lapack
pip install atlas
pip install cblas 
brew install scipy
brew install lapack
brew install atlas
brew install cblas 

这些都不起作用!请帮忙!

注意:我是mac用户。

这是我的错误代码:

 Your requirements.txt is invalid. Snapshot your logs for details.
ERROR: [Instance: i-03702ea3033581434] Command failed on instance. Return code: 1 Output: (TRUNCATED)...)
File "/usr/lib64/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1. 
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].

这是我的eb-activity.log:

libraries lapack_atlas not found in /usr/lib64
        libraries f77blas,cblas,atlas not found in /usr/lib
        libraries lapack_atlas not found in /usr/lib
      <class 'numpy.distutils.system_info.atlas_info'>
        NOT AVAILABLE

      /opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/system_info.py:572: UserWarning:
          Atlas (http://math-atlas.sourceforge.net/) libraries not found.
          Directories to search for the libraries can be specified in the
          numpy/distutils/site.cfg file (section [atlas]) or by setting
          the ATLAS environment variable.
        self.calc_info()
      lapack_info:
        libraries lapack not found in ['/opt/python/run/venv/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib
64', '/usr/lib']
        NOT AVAILABLE

      /opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/system_info.py:572: UserWarning:
          Lapack (http://www.netlib.org/lapack/) libraries not found.
          Directories to search for the libraries can be specified in the
          numpy/distutils/site.cfg file (section [lapack]) or by setting
          the LAPACK environment variable.
        self.calc_info()
      lapack_src_info:
        NOT AVAILABLE

      /opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/system_info.py:572: UserWarning:
          Lapack (http://www.netlib.org/lapack/) sources not found.
          Directories to search for the sources can be specified in the
          numpy/distutils/site.cfg file (section [lapack_src]) or by setting
          the LAPACK_SRC environment variable.
        self.calc_info()
        NOT AVAILABLE

Running from scipy source directory.
      non-existing path in 'scipy/integrate': 'quadpack.h'
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/pip-build-mfvADv/scipy/setup.py", line 416, in <module>
          setup_package()
        File "/tmp/pip-build-mfvADv/scipy/setup.py", line 412, in setup_package
          setup(**metadata)
        File "/opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/core.py", line 135, in setup
          config = configuration()
        File "/tmp/pip-build-mfvADv/scipy/setup.py", line 336, in configuration
          config.add_subpackage('scipy')
        File "/opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/misc_util.py", line 1029, in add_subpackage
          caller_level = 2)
        File "/opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/misc_util.py", line 998, in get_subpackage
          caller_level = caller_level + 1)
        File "/opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/misc_util.py", line 935, in _get_configuration_from_setup_py
          config = setup_module.configuration(*args)
        File "scipy/setup.py", line 15, in configuration
          config.add_subpackage('linalg')
        File "/opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/misc_util.py", line 1029, in add_subpackage
          caller_level = 2)
        File "/opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/misc_util.py", line 998, in get_subpackage
          caller_level = caller_level + 1)
        File "/opt/python/run/venv/local/lib64/python2.7/site-packages/numpy/distutils/misc_util.py", line 935, in _get_configuration_from_setup_py
          config = setup_module.configuration(*args)
        File "scipy/linalg/setup.py", line 20, in configuration
          raise NotFoundError('no lapack/blas resources found')
      numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

0 个答案:

没有答案