Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django 为什么scipy的pip安装在弹性豆茎中失败?_Django_Amazon Web Services_Amazon Elastic Beanstalk - Fatal编程技术网

Django 为什么scipy的pip安装在弹性豆茎中失败?

Django 为什么scipy的pip安装在弹性豆茎中失败?,django,amazon-web-services,amazon-elastic-beanstalk,Django,Amazon Web Services,Amazon Elastic Beanstalk,我正在将Django应用程序从Heroku迁移到Elastic Beanstalk。它在Heroku工作得很好 我得到的错误Your requirements.txt无效。快照日志以了解详细信息。当我深入了解eb活动时。log我发现故障似乎与atlas和scipy有关。我不明白为什么requirements.txt在aws上无效,但在heroku上有效。如能深入了解导致此错误的原因以及如何补救,我们将不胜感激 我的eb活动日志 /opt/python/run/venv/local/l

我正在将Django应用程序从Heroku迁移到Elastic Beanstalk。它在Heroku工作得很好

我得到的错误
Your requirements.txt无效。快照日志以了解详细信息。
当我深入了解
eb活动时。log
我发现故障似乎与
atlas
scipy
有关。我不明白为什么
requirements.txt
aws
上无效,但在
heroku
上有效。如能深入了解导致此错误的原因以及如何补救,我们将不胜感激

我的
eb活动日志

      /opt/python/run/venv/local/lib64/python3.4/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()
      /opt/python/run/venv/local/lib64/python3.4/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()
      /opt/python/run/venv/local/lib64/python3.4/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()
      Running from scipy source directory.
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/pip-build-ix0qk_kf/scipy/setup.py", line 416, in <module>
          setup_package()
        File "/tmp/pip-build-ix0qk_kf/scipy/setup.py", line 412, in setup_package
          setup(**metadata)
        File "/opt/python/run/venv/local/lib64/python3.4/site-packages/numpy/distutils/core.py", line 135, in setup
          config = configuration()
        File "/tmp/pip-build-ix0qk_kf/scipy/setup.py", line 336, in configuration
          config.add_subpackage('scipy')
        File "/opt/python/run/venv/local/lib64/python3.4/site-packages/numpy/distutils/misc_util.py", line 1029, in add_subpackage
          caller_level = 2)
        File "/opt/python/run/venv/local/lib64/python3.4/site-packages/numpy/distutils/misc_util.py", line 998, in get_subpackage
          caller_level = caller_level + 1)
        File "/opt/python/run/venv/local/lib64/python3.4/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/python3.4/site-packages/numpy/distutils/misc_util.py", line 1029, in add_subpackage
          caller_level = 2)
        File "/opt/python/run/venv/local/lib64/python3.4/site-packages/numpy/distutils/misc_util.py", line 998, in get_subpackage
          caller_level = caller_level + 1)
        File "/opt/python/run/venv/local/lib64/python3.4/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
      non-existing path in 'scipy/integrate': 'quadpack.h'

      ----------------------------------------
  Command "/opt/python/run/venv/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-ix0qk_kf/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-s8me7lme-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site/python3.4/scipy" failed with error code 1 in /tmp/pip-build-ix0qk_kf/scipy
  You are using pip version 7.1.2, however version 9.0.1 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  2017-08-29 05:20:43,974 ERROR    Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1
  Traceback (most recent call last):
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
      install_dependencies()
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
      check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
    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 (Executor::NonZeroExitStatus)
注意:答案可能与用户在Windows中编译scipy时遇到的问题略有关联

我的
django.config
位于
.ebextensions

option_settings:
  aws:elasticbeanstalk:container:python:
    WSGIPath: presto/wsgi.py
packages:

      yum:
        postgresql93: []
        postgresql93-devel: []
        pkgconfig: []
        gcc-c++: []
        python34-devel: []

可能我需要额外的依赖性才能正确编译
requirements.txt

您需要安装BLAS/LAPACK(以便
atlas
atlas dev
在您的系统上可用)。有关说明,请参阅,然后尝试将
libblas dev
liblapack dev
添加到配置文件中的yum软件包列表中。

错误是:
numpy.distutils.system\u info.NotFoundError:未找到lapack/blas资源
,因此您应该将问题改为“为什么scipy安装在Elastic Beanstalk上的pip失败?”. 此外,如果您搜索该错误,您将看到需要安装
atlas
atlas dev
软件包(或另一个BLAS/LAPACK,如果您愿意),有关如何安装
atlas
的详细信息,请参阅。我希望您需要将其中一些添加到
.ebextensions
yum软件包中。
option_settings:
  aws:elasticbeanstalk:container:python:
    WSGIPath: presto/wsgi.py
packages:

      yum:
        postgresql93: []
        postgresql93-devel: []
        pkgconfig: []
        gcc-c++: []
        python34-devel: []