git push heroku masterがうまく実行されない。
エラーメッセージから、python-3.6.9やheroku-20のバージョンが合ってないのかと思うのですが、解決策がわからずに困っております。
以下がターミナルのコマンドと実行結果です
% git push heroku master Enumerating objects: 10, done. Counting objects: 100% (10/10), done. Delta compression using up to 8 threads Compressing objects: 100% (9/9), done. Writing objects: 100% (10/10), 70.02 MiB | 6.43 MiB/s, done. Total 10 (delta 0), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Determining which buildpack to use for this app remote: -----> Python app detected remote: -----> Using Python version specified in runtime.txt remote: ! Requested runtime (python-3.6.9) is not available for this stack (heroku-20). remote: ! Aborting. More info: https://devcenter.heroku.com/articles/python-support remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: 6bfu9abc2b882998bca85efcf0000e650c00000f remote: ! remote: ! We have detected that you have triggered a build from source code with version 6bfu9abc2b882998bca85efcf0000e650c00000f remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run: remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: ! https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to tw-bot-0000. remote: To https://git.heroku.com/tw-bot-0000.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/tw-bot-0000.git'
heroku logsのURLから表示されるメッセージです↓
% heroku logs -----> Building on the Heroku-20 stack -----> Determining which buildpack to use for this app -----> Python app detected -----> Using Python version specified in runtime.txt ! Requested runtime (python-3.6.9) is not available for this stack (heroku-20). ! Aborting. More info: https://devcenter.heroku.com/articles/python-support ! Push rejected, failed to compile Python app. ! Push failed
同じディレクトリ内にある、runtime.txtファイルでpython-3.6.9を指定しております。
Heroku Python Supportを参考にpython-3.6.15に書き換えたりもしましたが、変化なし。
追加で必要な情報があれば、すぐに確認します。
原因や解決方法がわかる方がいらっしゃいましたら、アドバイスいただけると幸いです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。