matplotlib を使用する Heroku に Web アプリをデプロイしようとしています。この質問は関連していますが、私の特定の問題に対処していないようです。より正確には、テスト目的で複製アプリの「ステージング」を展開しています。コマンドを実行すると:
git push staging master
アプリを Heroku にプッシュしようとすると、予期しない Heroku プッシュ拒否が発生します。
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.1.1
python: 2.7.2 (default, Oct 31 2011, 16:22:04) [GCC 4.4.3]
platform: linux2
REQUIRED DEPENDENCIES
numpy: no
* You must install numpy 1.4 or later to build
* matplotlib.
Complete output from command python setup.py egg_info:
basedirlist is: ['/usr/local', '/usr']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.1.1
python: 2.7.2 (default, Oct 31 2011, 16:22:04) [GCC 4.4.3]
platform: linux2
REQUIRED DEPENDENCIES
numpy: no
* You must install numpy 1.4 or later to build
* matplotlib.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/build_sj82km4g47z3/.heroku/venv/build/matplotlib
Storing complete log in /app/.pip/pip.log
! Heroku push rejected, failed to compile Python app
To git@heroku.com:warm-atoll-3630.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:warm-atoll-3630.git'
この問題を解決したと思っていたので、予想外でした。実際、私の本番アプリは問題なく動作しています。2層の要件ファイルを作成することで解決しました。
要件.txt:
numpy==1.6.2
-r ./prod-requirements.txt
prod-requirements.txt:
matplotlib==1.1.1
other requirements...
明らかに、この問題を実際にどのように解決したかを忘れてしまいました。matplotlib が numpy に依存する方法と、Heroku が pip を介して要件をインストールする方法のために、これが難しいことを覚えています。これが私が言及している問題です。何ができるでしょうか?前もって感謝します。