Herokuにdjangoアプリをデプロイする際「git push heroku master」にエラーが発生してしまいます。
エラーは以下の通りです。
Complete output from command python setup.py egg_info: remote: Traceback (most recent call last): remote: File "<string>", line 1, in <module> remote: File "/tmp/pip-build-zn27mlk3/unroll/setup.py", line 1, in <module> remote: import ez_setup remote: ModuleNotFoundError: No module named 'ez_setup' remote: remote: ---------------------------------------- remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-zn27mlk3/unroll/ remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to test-app0011. remote: To https://git.heroku.com/test-app0011.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/test-app0011.git'
エラー内容から「ez_setup」がインストールされていないと思い、pip install ez_setup
コマンドを実行したのですが、
Requirement already satisfied: ez_setup in in /Users/[username]/.pyenv/versions/3.7.5/lib/python3.7/site-packages (0.9)
と表示されたことから、既にインストール済みかと思われます。
他、試したこととしましては、GitHubのページを参考に pip install setuptools
を実行いたしました。結果は以下となります。
Requirement already satisfied: setuptools in /Users/[username]/.pyenv/versions/3.7.5/lib/python3.7/site-packages (42.0.0)
インストールされているにも関わらず何故エラーが発生してしまうか分からないといった状況です...
どなたか解決の為、ご助言頂けましたら幸いです。。
※OSはmacOSMojaveを使用しております。
追記です
以下のコマンドは実行したと思っていたのですが、再度ご回答でご助言頂いた為、行いましたら、エラー内容が変わりました。
pip freeze > requirements.txt
Complete output from command python setup.py egg_info: remote: Traceback (most recent call last): remote: File "<string>", line 1, in <module> remote: File "/tmp/pip-build-7nson9r1/FiPy/setup.py", line 15, in <module> remote: from _setup.build_docs import build_docs remote: File "/tmp/pip-build-7nson9r1/FiPy/_setup/build_docs.py", line 4, in <module> remote: from future.utils import text_to_native_str remote: ModuleNotFoundError: No module named 'future' remote: remote: ---------------------------------------- remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7nson9r1/FiPy/ remote: ! Push rejected, failed to compile Python app.
おそらくこちらのエラーなのですが、futureモジュールは入っているみたいです。pip3 install future
の結果は、以下の通りです。
Requirement already satisfied: future in /Users/[username]/.pyenv/versions/3.7.5/lib/python3.7/site-packages (0.18.2)
追記2
以下は```git push heroku master````時の全ログになります。
Enumerating objects: 1020, done. Counting objects: 100% (1020/1020), done. Delta compression using up to 8 threads Compressing objects: 100% (1002/1002), done. Writing objects: 100% (1020/1020), 3.24 MiB | 221.00 KiB/s, done. Total 1020 (delta 92), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Python app detected remote: -----> Installing python-3.7.5 remote: -----> Installing pip remote: -----> Installing SQLite3 remote: -----> Installing requirements with pip remote: Collecting ansicolors==1.1.8 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 1)) remote: Downloading https://files.pythonhosted.org/packages/53/18/a56e2fe47b259bb52201093a3a9d4a32014f9d85071ad07e9d60600890ca/ansicolors-1.1.8-py2.py3-none-any.whl remote: Collecting cachetools==3.1.1 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 2)) remote: Downloading https://files.pythonhosted.org/packages/2f/a6/30b0a0bef12283e83e58c1d6e7b5aabc7acfc4110df81a4471655d33e704/cachetools-3.1.1-py2.py3-none-any.whl remote: Collecting certifi==2019.9.11 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 3)) remote: Downloading https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl (154kB) remote: Collecting chardet==3.0.4 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 4)) remote: Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB) remote: Collecting cycler==0.10.0 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 5)) remote: Downloading https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl remote: Collecting decorator==4.4.1 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 6)) remote: Downloading https://files.pythonhosted.org/packages/8f/b7/f329cfdc75f3d28d12c65980e4469e2fa373f1953f5df6e370e84ea2e875/decorator-4.4.1-py2.py3-none-any.whl remote: Collecting dj-database-url==0.5.0 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 7)) remote: Downloading https://files.pythonhosted.org/packages/d4/a6/4b8578c1848690d0c307c7c0596af2077536c9ef2a04d42b00fabaa7e49d/dj_database_url-0.5.0-py2.py3-none-any.whl remote: Collecting Django==2.2.7 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 8)) remote: Downloading https://files.pythonhosted.org/packages/a0/36/463632a2e9161a7e713488d719a280e8cb0c7e3a66ed32a32e801891caae/Django-2.2.7-py3-none-any.whl (7.5MB) remote: Collecting django-heroku==0.3.1 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 9)) remote: Downloading https://files.pythonhosted.org/packages/59/af/5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6/django_heroku-0.3.1-py2.py3-none-any.whl remote: Collecting ez-setup==0.9 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 10)) remote: Downloading https://files.pythonhosted.org/packages/ba/2c/743df41bd6b3298706dfe91b0c7ecdc47f2dc1a3104abeb6e9aa4a45fa5d/ez_setup-0.9.tar.gz remote: Collecting FiPy==3.3 (from -r /tmp/build_c8e06546abf97c1bc21c0e780e00c581/requirements.txt (line 11)) remote: Downloading https://files.pythonhosted.org/packages/d5/44/71e621c7b06e3ef4f19b8e064d729b6f7378ae3c9a1ecaf66f0ad16e0cea/FiPy-3.3.tar.gz (714kB) remote: Complete output from command python setup.py egg_info: remote: Traceback (most recent call last): remote: File "<string>", line 1, in <module> remote: File "/tmp/pip-build-8fey8q1r/FiPy/setup.py", line 15, in <module> remote: from _setup.build_docs import build_docs remote: File "/tmp/pip-build-8fey8q1r/FiPy/_setup/build_docs.py", line 4, in <module> remote: from future.utils import text_to_native_str remote: ModuleNotFoundError: No module named 'future' remote: remote: ---------------------------------------- remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8fey8q1r/FiPy/ remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to test-app0011. remote: To https://git.heroku.com/test-app0011.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/test-app0011.git'
追記3
「git add. git commit」を再度行いましたら、エラー内容が変わりました。
Enumerating objects: 1023, done. Counting objects: 100% (1023/1023), done. Delta compression using up to 8 threads Compressing objects: 100% (1004/1004), done. Writing objects: 100% (1023/1023), 3.24 MiB | 107.00 KiB/s, done. Total 1023 (delta 93), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Python app detected remote: ! Requested runtime (python-3.7.3 python-3.7.5) is not available for this stack (heroku-18). remote: ! Aborting. More info: https://devcenter.heroku.com/articles/python-support remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to test-app0011. remote: To https://git.heroku.com/test-app0011.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/test-app0011.git'
追記4
以下はrequirements.txtファイルの中身になります。
ansicolors==1.1.8 cachetools==3.1.1 certifi==2019.9.11 chardet==3.0.4 cycler==0.10.0 decorator==4.4.1 dj-database-url==0.5.0 Django==2.2.7 django-heroku==0.3.1 ez-setup==0.9 FiPy==3.3 future==0.18.2 gitdb2==2.0.6 GitPython==3.0.5 gunicorn==20.0.0 idna==2.8 imageio==2.6.1 imageio-ffmpeg==0.3.0 joblib==0.14.0 kiwisolver==1.1.0 matplotlib==3.1.2 moviepy==1.0.1 music21==5.7.1 numpy==1.17.3 pbr==5.4.3 Pillow==6.2.1 proglog==0.1.9 psycopg2==2.8.4 pyparsing==2.4.5 python-dateutil==2.8.1 pytz==2019.3 reppy==0.4.14 requests==2.22.0 scikit-learn==0.21.3 scipy==1.3.1 six==1.13.0 smmap2==2.0.5 sqlparse==0.3.0 stevedore==1.31.0 tqdm==4.38.0 unroll==0.1.0 urllib3==1.25.7 virtualenv==16.7.7 virtualenv-clone==0.5.3 virtualenvwrapper==4.8.4 whitenoise==4.1.4
追記5
以下はruntime.txtファイルの中身になります。
python-3.7.3 python-3.7.5
runtime.txtファイルの中身を、自分の環境のバージョンpython-3.7.5のみとし、再度pip freeze > requirements.txt
とし「git commit」から「git push heroku master」としました、再度ModuleNotFoundError: No module named 'future'
こちらのエラーが発生してしまいました。。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/11/24 05:09
2019/11/24 06:35
2019/11/24 08:56
2019/11/24 09:02
2019/11/24 09:07
2019/11/24 11:51
2019/11/24 11:53
2019/11/24 11:54
2019/11/24 11:56
2019/11/24 11:57
2019/11/24 12:03
2019/11/24 13:52
2019/11/25 00:11
2019/11/25 00:35
2019/11/25 00:46
2019/11/25 04:11
2019/11/25 05:04 編集
2019/11/25 07:39