1

I'm following AWS Elastic Beanstalk's Flask tutorial to deploy my application. Though I get error Your requirements.txt is invalid - in full as below. I dont write the requirement file myself, I generate it via pip freeze command.

The problem seems to happen when I use scipy.optimize module. The scripts runs without any problems on my local server though. Seems like the problem comes from lapack/atlas/cblas that are not imported properly. I have already tried

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

None of that worked! Please help!

NB : I am a mac user.

Here is my ERROR Code :

 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].

Here is my 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
David Serero
  • 144
  • 9

0 Answers0