2017-08-29 7 views
0

私はHerokuのDjangoアプリをElastic Beanstalkに移行しています。それはそのままヘロクでうまくいきます。なぜ鱗茎のピップインストールが弾力のある豆腐で失敗していますか?

エラーが発生しましたYour requirements.txt is invalid. Snapshot your logs for details.eb-activity.logに飛び込むと、エラーがatlasscipyに関連しているようです。私はなぜrequirements.txtawsで無効ですが、herokuで有効であるのか理解できません。このエラーの原因と解決方法についての洞察は非常に高く評価されます。

マイ eb-activity.log

 /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) 

マイrequirements.txt

amqp==2.1.4 
apiai==1.2.3 
billiard==3.5.0.2 
celery==4.0.2 
certifi==2017.4.17 
chardet==3.0.4 
DateTime==4.2 
Django==1.11.2 
django-eztables==0.3.2 
django-hstore==1.4.2 
django-tables2==1.9.0 
django.js==0.8.1 
djangorestframework==3.6.3 
gunicorn==19.7.1 
idna==2.5 
kombu==4.0.2 
messagebird==1.2.0 
numpy==1.13.0 
psycopg2==2.7.1 
pytz==2017.2 
requests==2.18.1 
requests-toolbelt==0.8.0 
urllib3==1.21.1 
vine==1.1.3 
virtualenv==15.1.0 
whitenoise==3.3.0 
zope.interface==4.4.2 
gevent==1.2.1 
klein==17.2.0 
boto3==1.4.4 
typing==3.5.3.0 
future==0.16.0 
six==1.10.0 
jsonschema==2.6.0 
tqdm==4.11.2 
scipy==0.19.0 
# sklearn_crfsuite 
sklearn-crfsuite==0.3.5 
# spacy 
spacy==1.8.2 
# sklearn 
scikit-learn==0.18.1 
# duckling 
duckling==1.7.1 
# cloudpickle 
cloudpickle==0.2.2 
# test 
python-coveralls==2.9.1 
pytest-pep8==1.0.6 
pytest-services==1.1.14 
pytest-cov==2.5.1 
pytest-twisted==1.5 
pytest==3.0.7 
treq==17.3.1 
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-1.2.0/en_core_web_sm-1.2.0.tar.gz 

注:答えは少し、ユーザがWindowsでscipyをコンパイルの問題を抱えていたthis questionに関係することができます。

私のそれは私が正しくrequirements.txtをコンパイルするために、追加の依存関係を必要とすることかもしれdjango.config

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

     yum: 
     postgresql93: [] 
     postgresql93-devel: [] 
     pkgconfig: [] 
     gcc-c++: [] 
     python34-devel: [] 
.ebextensionsに。

+0

エラーは: 'numpy.distutils.system_info.NotFoundError:no lapack/blas resources found 'です。質問を「Elip Beanstalkでpipでインストールできないのはなぜですか?」という質問を変更する必要があります。また、そのエラーを検索すると、 'atlas'と' atlas-dev'パッケージ(または、もし望むなら別のBLAS/LAPACK)をインストールする必要があることがわかります – dirkgroten

+0

[このリンク](https:// scipy .org/scipylib/building/linux.html#installation-from-source) 'atlas'のインストール方法の詳細を参照してください。私はあなたの '.ebextensions' yumパッケージにこれらのいくつかを追加する必要があると思います。 – dirkgroten

答えて

1

BLAS/LAPACKをインストールする必要があります(ご使用のシステムでatlasatlas-devが利用可能です)。手順については、this linkを参照し、設定ファイルのパッケージのyumリストにlibblas-devliblapack-devを追加してみてください。

+0

これを追加すると問題が解決しました。 – hackerman

関連する問題